Curl_is_connected: use proxy name in error message when proxy is used
authorDaniel Stenberg <daniel@haxx.se>
Wed, 4 Dec 2013 21:46:49 +0000 (22:46 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 4 Dec 2013 21:51:37 +0000 (22:51 +0100)
(bug introduced in 255826c4, never present in a release)

Reported-by: Dima Tisnek
Bug: http://curl.haxx.se/mail/lib-2013-12/0006.html

lib/connect.c

index 9c38724d63d30f1d218a09934a3e2974a432de66..a39699ba79de2e83422ade52a5721dc00e722f1b 100644 (file)
@@ -827,7 +827,8 @@ CURLcode Curl_is_connected(struct connectdata *conn,
     }
 
     failf(data, "Failed to connect to %s port %ld: %s",
-          conn->host.name, conn->port, Curl_strerror(conn, error));
+          conn->bits.proxy?conn->proxy.name:conn->host.name,
+          conn->port, Curl_strerror(conn, error));
   }
 
   return code;