added info in to failf() lines and added a infof() call just before the
authorDaniel Stenberg <daniel@haxx.se>
Wed, 10 Apr 2002 14:20:24 +0000 (14:20 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 10 Apr 2002 14:20:24 +0000 (14:20 +0000)
connect() so that it tells to which host and what port it is about to
attempt the connection

lib/connect.c

index 66035dc3f0cf3dcc3b1dd4d855f74345d93aac82..ee52b67645e5b1ce894c6a05874f6f3dfe1e4f8d 100644 (file)
@@ -385,6 +385,9 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
     }
   }
 
+  infof(data, "About to connect() to %s:%d\n",
+        data->change.proxy?conn->proxyhost:conn->hostname, port);
+
 #ifdef ENABLE_IPV6
   /*
    * Connecting with IPv6 support is so much easier and cleanly done
@@ -424,7 +427,7 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
         case ECONNREFUSED: /* no one listening */
         default:
           /* unknown error, fallthrough and try another address! */
-          failf(data, "Failed to connect");
+          failf(data, "Failed to connect: %d", error);
           break;
         }
       }
@@ -529,7 +532,8 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
         break;
       default:
         /* unknown error, fallthrough and try another address! */
-        failf(data, "Failed to connect to IP number %d", aliasindex+1);
+        failf(data, "Failed to connect to IP number %d: %d",
+              aliasindex+1, error);
         break;
       }
     }