Loading lib/connect.c +5 −4 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ static CURLcode trynextip(struct connectdata *conn, int sockindex, int tempindex) { CURLcode rc = CURLE_COULDNT_CONNECT; CURLcode result = CURLE_COULDNT_CONNECT; /* First clean up after the failed socket. Don't close it yet to ensure that the next IP's socket gets a different Loading Loading @@ -575,11 +575,12 @@ static CURLcode trynextip(struct connectdata *conn, ai = ai->ai_next; if(ai) { rc = singleipconnect(conn, ai, &conn->tempsock[tempindex]); if(rc == CURLE_COULDNT_CONNECT) { result = singleipconnect(conn, ai, &conn->tempsock[tempindex]); if(result == CURLE_COULDNT_CONNECT) { ai = ai->ai_next; continue; } conn->tempaddr[tempindex] = ai; } break; Loading @@ -589,7 +590,7 @@ static CURLcode trynextip(struct connectdata *conn, if(fd_to_close != CURL_SOCKET_BAD) Curl_closesocket(conn, fd_to_close); return rc; return result; } /* Copies connection info into the session handle to make it available Loading lib/hostasyn.c +5 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -75,7 +75,7 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, struct Curl_addrinfo *ai) { struct Curl_dns_entry *dns = NULL; CURLcode rc = CURLE_OK; CURLcode result = CURLE_OK; conn->async.status = status; Loading @@ -92,14 +92,14 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, if(!dns) { /* failed to store, cleanup and return error */ Curl_freeaddrinfo(ai); rc = CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY; } if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); } else { rc = CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY; } } Loading @@ -112,7 +112,7 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, /* ipv4: The input hostent struct will be freed by ares when we return from this function */ return rc; return result; } /* Call this function after Curl_connect() has returned async=TRUE and Loading lib/vtls/openssl.c +13 −14 Original line number Diff line number Diff line Loading @@ -1913,8 +1913,7 @@ ossl_connect_step1(struct connectdata *conn, return CURLE_OK; } static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) { struct SessionHandle *data = conn->data; int err; Loading Loading @@ -1946,7 +1945,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) unsigned long errdetail; char error_buffer[256]; /* OpenSSL documents that this must be at least 256 bytes long. */ CURLcode rc; CURLcode result; const char *cert_problem = NULL; long lerr; Loading @@ -1970,7 +1969,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed */ rc = CURLE_SSL_CACERT; result = CURLE_SSL_CACERT; lerr = SSL_get_verify_result(connssl->handle); if(lerr != X509_V_OK) { Loading @@ -1984,7 +1983,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) break; default: rc = CURLE_SSL_CONNECT_ERROR; result = CURLE_SSL_CONNECT_ERROR; SSL_strerror(errdetail, error_buffer, sizeof(error_buffer)); break; } Loading @@ -1995,15 +1994,16 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) * (RST connection etc.), OpenSSL gives no explanation whatsoever and * the SO_ERROR is also lost. */ if(CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) { if(CURLE_SSL_CONNECT_ERROR == result && errdetail == 0) { failf(data, "Unknown SSL protocol error in connection to %s:%ld ", conn->host.name, conn->remote_port); return rc; return result; } /* Could be a CERT problem */ /* Could be a CERT problem */ failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer); return rc; return result; } } else { Loading Loading @@ -2035,10 +2035,9 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) conn->negnpn = NPN_HTTP1_1; } } else { else infof(data, "ALPN, server did not agree to a protocol\n"); } } #endif return CURLE_OK; Loading Loading
lib/connect.c +5 −4 Original line number Diff line number Diff line Loading @@ -541,7 +541,7 @@ static CURLcode trynextip(struct connectdata *conn, int sockindex, int tempindex) { CURLcode rc = CURLE_COULDNT_CONNECT; CURLcode result = CURLE_COULDNT_CONNECT; /* First clean up after the failed socket. Don't close it yet to ensure that the next IP's socket gets a different Loading Loading @@ -575,11 +575,12 @@ static CURLcode trynextip(struct connectdata *conn, ai = ai->ai_next; if(ai) { rc = singleipconnect(conn, ai, &conn->tempsock[tempindex]); if(rc == CURLE_COULDNT_CONNECT) { result = singleipconnect(conn, ai, &conn->tempsock[tempindex]); if(result == CURLE_COULDNT_CONNECT) { ai = ai->ai_next; continue; } conn->tempaddr[tempindex] = ai; } break; Loading @@ -589,7 +590,7 @@ static CURLcode trynextip(struct connectdata *conn, if(fd_to_close != CURL_SOCKET_BAD) Curl_closesocket(conn, fd_to_close); return rc; return result; } /* Copies connection info into the session handle to make it available Loading
lib/hostasyn.c +5 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -75,7 +75,7 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, struct Curl_addrinfo *ai) { struct Curl_dns_entry *dns = NULL; CURLcode rc = CURLE_OK; CURLcode result = CURLE_OK; conn->async.status = status; Loading @@ -92,14 +92,14 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, if(!dns) { /* failed to store, cleanup and return error */ Curl_freeaddrinfo(ai); rc = CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY; } if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); } else { rc = CURLE_OUT_OF_MEMORY; result = CURLE_OUT_OF_MEMORY; } } Loading @@ -112,7 +112,7 @@ CURLcode Curl_addrinfo_callback(struct connectdata *conn, /* ipv4: The input hostent struct will be freed by ares when we return from this function */ return rc; return result; } /* Call this function after Curl_connect() has returned async=TRUE and Loading
lib/vtls/openssl.c +13 −14 Original line number Diff line number Diff line Loading @@ -1913,8 +1913,7 @@ ossl_connect_step1(struct connectdata *conn, return CURLE_OK; } static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) { struct SessionHandle *data = conn->data; int err; Loading Loading @@ -1946,7 +1945,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) unsigned long errdetail; char error_buffer[256]; /* OpenSSL documents that this must be at least 256 bytes long. */ CURLcode rc; CURLcode result; const char *cert_problem = NULL; long lerr; Loading @@ -1970,7 +1969,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) SSL routines: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed */ rc = CURLE_SSL_CACERT; result = CURLE_SSL_CACERT; lerr = SSL_get_verify_result(connssl->handle); if(lerr != X509_V_OK) { Loading @@ -1984,7 +1983,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) break; default: rc = CURLE_SSL_CONNECT_ERROR; result = CURLE_SSL_CONNECT_ERROR; SSL_strerror(errdetail, error_buffer, sizeof(error_buffer)); break; } Loading @@ -1995,15 +1994,16 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) * (RST connection etc.), OpenSSL gives no explanation whatsoever and * the SO_ERROR is also lost. */ if(CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) { if(CURLE_SSL_CONNECT_ERROR == result && errdetail == 0) { failf(data, "Unknown SSL protocol error in connection to %s:%ld ", conn->host.name, conn->remote_port); return rc; return result; } /* Could be a CERT problem */ /* Could be a CERT problem */ failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer); return rc; return result; } } else { Loading Loading @@ -2035,10 +2035,9 @@ ossl_connect_step2(struct connectdata *conn, int sockindex) conn->negnpn = NPN_HTTP1_1; } } else { else infof(data, "ALPN, server did not agree to a protocol\n"); } } #endif return CURLE_OK; Loading