diff options
Diffstat (limited to 'libs/libcurl/src/connect.c')
-rw-r--r-- | libs/libcurl/src/connect.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/libs/libcurl/src/connect.c b/libs/libcurl/src/connect.c index b000b1b2c2..5f23b79ca0 100644 --- a/libs/libcurl/src/connect.c +++ b/libs/libcurl/src/connect.c @@ -83,11 +83,6 @@ #include "curl_memory.h" #include "memdebug.h" -#ifdef __SYMBIAN32__ -/* This isn't actually supported under Symbian OS */ -#undef SO_NOSIGPIPE -#endif - static bool verifyconnect(curl_socket_t sockfd, int *error); #if defined(__DragonFly__) || defined(HAVE_WINSOCK_H) @@ -746,8 +741,8 @@ static CURLcode connect_SOCKS(struct connectdata *conn, int sockindex, bool *done) { CURLcode result = CURLE_OK; - #ifndef CURL_DISABLE_PROXY + CURLproxycode pxresult = CURLPX_OK; if(conn->bits.socksproxy) { /* for the secondary socket (FTP), use the "connect to host" * but ignore the "connect to port" (use the secondary port) @@ -767,20 +762,24 @@ static CURLcode connect_SOCKS(struct connectdata *conn, int sockindex, switch(conn->socks_proxy.proxytype) { case CURLPROXY_SOCKS5: case CURLPROXY_SOCKS5_HOSTNAME: - result = Curl_SOCKS5(conn->socks_proxy.user, conn->socks_proxy.passwd, - host, port, sockindex, conn, done); + pxresult = Curl_SOCKS5(conn->socks_proxy.user, conn->socks_proxy.passwd, + host, port, sockindex, conn, done); break; case CURLPROXY_SOCKS4: case CURLPROXY_SOCKS4A: - result = Curl_SOCKS4(conn->socks_proxy.user, host, port, sockindex, - conn, done); + pxresult = Curl_SOCKS4(conn->socks_proxy.user, host, port, sockindex, + conn, done); break; default: failf(conn->data, "unknown proxytype option given"); result = CURLE_COULDNT_CONNECT; } /* switch proxytype */ + if(pxresult) { + result = CURLE_PROXY; + conn->data->info.pxcode = pxresult; + } } else #else @@ -1313,10 +1312,9 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ const struct Curl_dns_entry *remotehost) { struct Curl_easy *data = conn->data; - struct curltime before = Curl_now(); CURLcode result = CURLE_COULDNT_CONNECT; int i; - timediff_t timeout_ms = Curl_timeleft(data, &before, TRUE); + timediff_t timeout_ms = Curl_timeleft(data, NULL, TRUE); if(timeout_ms < 0) { /* a precaution, no need to continue if time already is up */ @@ -1416,8 +1414,7 @@ curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, } return c->sock[FIRSTSOCKET]; } - else - return CURL_SOCKET_BAD; + return CURL_SOCKET_BAD; } /* |