aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2004-12-13 17:52:55 +0000
committerGisle Vanem <gvanem@broadpark.no>2004-12-13 17:52:55 +0000
commit1dc15ec1bc034864cb11156af6f2ba9714ca95a1 (patch)
treef57326c80de7411096e43dcf5b4236e58cf79867
parent6a9ed4408831750861a68586a372e3da9a501b38 (diff)
Set 'data->state.os_errno = error' in some places.
Needed elsewhere too?
-rw-r--r--lib/connect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 141d9593f..3b40891ad 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -528,13 +528,15 @@ CURLcode Curl_is_connected(struct connectdata *conn,
/* nope, not connected */
if (WAITCONN_FDSET_ERROR == rc) {
verifyconnect(sockfd, &error);
+ data->state.os_errno = error;
infof(data, "%s\n",Curl_strerror(conn,error));
}
else
- infof(data, "Connection failed\n");
+ infof(data, "Connection failed\n");
if(trynextip(conn, sockindex, connected)) {
error = Curl_ourerrno();
+ data->state.os_errno = error;
failf(data, "Failed connect to %s:%d; %s",
conn->host.name, conn->port, Curl_strerror(conn,error));
code = CURLE_COULDNT_CONNECT;
@@ -644,6 +646,7 @@ singleipconnect(struct connectdata *conn,
/* unknown error, fallthrough and try another address! */
failf(data, "Failed to connect to %s: %s",
addr_buf, Curl_strerror(conn,error));
+ data->state.os_errno = error;
break;
}
}