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
1 changed files with 1 additions and 1 deletions

View File

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