1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

connect.c: return changed to CURLE_COULDNT_CONNECT when opensocket fails

Curl_socket returns CURLE_COULDNT_CONNECT when the opensocket callback
returns CURL_SOCKET_BAD. Previous return value CURLE_FAILED_INIT
conveys incorrect information to the user.
This commit is contained in:
Lijo Antony 2012-04-03 02:45:25 +04:00 committed by Daniel Stenberg
parent 15e1227ed4
commit 950b0b770e

View File

@ -1228,7 +1228,7 @@ CURLcode Curl_socket(struct connectdata *conn,
if(*sockfd == CURL_SOCKET_BAD) if(*sockfd == CURL_SOCKET_BAD)
/* no socket, no connection */ /* no socket, no connection */
return CURLE_FAILED_INIT; return CURLE_COULDNT_CONNECT;
#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) #if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
if(conn->scope && (addr->family == AF_INET6)) { if(conn->scope && (addr->family == AF_INET6)) {