diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-14 14:12:37 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-14 14:12:37 (GMT) |
commit | 587b06788071e818823aabb5e31ef283f9278506 (patch) | |
tree | f7da9ee845a728f797a11b31fc9499a0731d528c /Source/CTest/Curl/connect.c | |
parent | 6c61762b0f2d43b78f67b7ce9ec8d5f03765e11f (diff) | |
download | CMake-587b06788071e818823aabb5e31ef283f9278506.zip CMake-587b06788071e818823aabb5e31ef283f9278506.tar.gz CMake-587b06788071e818823aabb5e31ef283f9278506.tar.bz2 |
New Curl version 7.10.3
Diffstat (limited to 'Source/CTest/Curl/connect.c')
-rw-r--r-- | Source/CTest/Curl/connect.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Source/CTest/Curl/connect.c b/Source/CTest/Curl/connect.c index eb6f4f3..5aa9f8b 100644 --- a/Source/CTest/Curl/connect.c +++ b/Source/CTest/Curl/connect.c @@ -176,10 +176,9 @@ int waitconnect(int sockfd, /* socket */ /* timeout, no connect today */ return 1; - if(FD_ISSET(sockfd, &errfd)) { + if(FD_ISSET(sockfd, &errfd)) /* error condition caught */ return 2; - } /* we have a connect! */ return 0; @@ -380,6 +379,11 @@ CURLcode Curl_is_connected(struct connectdata *conn, return CURLE_OPERATION_TIMEOUTED; } } + if(conn->bits.tcpconnect) { + /* we are connected already! */ + *connected = TRUE; + return CURLE_OK; + } /* check for connect without timeout as we want to return immediately */ rc = waitconnect(sockfd, 0); @@ -646,6 +650,15 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ } } + /* The '1 == rc' comes from the waitconnect(), and not from connect(). + We can be sure of this since connect() cannot return 1. */ + if((1 == rc) && (data->state.used_interface == Curl_if_multi)) { + /* Timeout when running the multi interface, we return here with a + CURLE_OK return code. */ + rc = 0; + break; + } + if(0 == rc) { int err = socketerror(sockfd); if ((0 == err) || (EISCONN == err)) { @@ -658,12 +671,6 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ } if(0 != rc) { - if(data->state.used_interface == Curl_if_multi) { - /* When running the multi interface, we bail out here */ - rc = 0; - break; - } - /* get a new timeout for next attempt */ after = Curl_tvnow(); timeout_ms -= Curl_tvdiff(after, before); |