aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-22 15:23:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-22 15:23:01 +0000
commitd73425061ab5154b1d1218bc1f6f5c3bfea26b5c (patch)
treef35b77b24a69e2678af41024da8f1fda8e876472
parent0051d5ac8880e3fc2f59e18d7ae90e71b46ee249 (diff)
Moved the "About to connect() to" text to the place where the host name is
actually known, as before this text lied when used in i.e FTP.
-rw-r--r--lib/connect.c12
-rw-r--r--lib/url.c5
2 files changed, 7 insertions, 10 deletions
diff --git a/lib/connect.c b/lib/connect.c
index a2c5ad612..9c2d8a235 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -507,11 +507,8 @@ CURLcode Curl_is_connected(struct connectdata *conn,
return CURLE_COULDNT_CONNECT;
}
/*
- * If the connection phase is "done" here, we should attempt to connect
- * to the "next address" in the Curl_hostaddr structure that we resolved
- * before. But we don't have that struct around anymore and we can't just
- * keep a pointer since the cache might in fact have gotten pruned by the
- * time we want to read this... Alas, we don't do this yet.
+ * If the connection failed here, we should attempt to connect to the "next
+ * address" for the given host.
*/
return CURLE_OK;
@@ -604,11 +601,6 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
num_addr = Curl_num_addresses(remotehost->addr);
timeout_per_addr = timeout_ms / num_addr;
- hostname = data->change.proxy?conn->proxy.name:conn->host.name;
-
- infof(data, "About to connect() to %s port %d\n",
- hostname, port);
-
/* Below is the loop that attempts to connect to all IP-addresses we
* know for the given host. One by one until one IP succeedes.
*/
diff --git a/lib/url.c b/lib/url.c
index e165b3730..4c4453a77 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1940,6 +1940,11 @@ static CURLcode ConnectPlease(struct connectdata *conn,
{
CURLcode result;
Curl_ipconnect *addr;
+ struct SessionHandle *data = conn->data;
+ char *hostname = data->change.proxy?conn->proxy.name:conn->host.name;
+
+ infof(data, "About to connect() to %s port %d\n",
+ hostname, conn->port);
/*************************************************************
* Connect to server/proxy