From 46c699c483f3e453fa6b0e8f69846ecce95a1a0f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 13 Jul 2007 20:17:35 +0000 Subject: Colin Hogben filed bug report #1750274 (http://curl.haxx.se/bug/view.cgi?id=1750274) and submitted a patch for the case where libcurl did a connect attempt to a non-listening port and didn't provide a human readable error string back. --- lib/connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/connect.c b/lib/connect.c index 65b2878b3..d608e1e2e 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -577,6 +577,8 @@ CURLcode Curl_is_connected(struct connectdata *conn, data->state.os_errno = error; infof(data, "Connection failed\n"); if(trynextip(conn, sockindex, connected)) { + failf(data, "Failed connect to %s:%d; %s", + conn->host.name, conn->port, Curl_strerror(conn, error)); code = CURLE_COULDNT_CONNECT; } } @@ -596,7 +598,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, error = SOCKERRNO; data->state.os_errno = error; failf(data, "Failed connect to %s:%d; %s", - conn->host.name, conn->port, Curl_strerror(conn,error)); + conn->host.name, conn->port, Curl_strerror(conn, error)); code = CURLE_COULDNT_CONNECT; } } -- cgit v1.2.3