aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijo Antony <lijotantony@gmail.com>2012-04-03 02:45:25 +0400
committerDaniel Stenberg <daniel@haxx.se>2012-04-03 22:56:29 +0200
commit950b0b770ebc4736f7623b0bd3c038cf9e26ad6f (patch)
treeba255e2a6c68cdd3709c1f88baea141899c6e9b3
parent15e1227ed4cbf3364c70f4aa8fb4141879777a6d (diff)
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.
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 38f68b428..2d592291d 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -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)) {