aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-30 13:31:25 +0100
committerYang Tse <yangsita@gmail.com>2010-11-30 13:31:25 +0100
commitc328214a2dc145bd5671c6dcb88865d195c5dea1 (patch)
treeed004ab590d18161c1d62f85be150bc46b057772
parentf6f5d7874f6a890f2626195f169abcbfc785b220 (diff)
fix getinfo CURLINFO_LOCAL* for reused connections
Failed to commit this file changes along with the others.
-rw-r--r--lib/url.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/url.c b/lib/url.c
index 0aed7b44b..e3d89ebe6 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4599,6 +4599,8 @@ static void reuse_conn(struct connectdata *old_conn,
else
free(old_conn->host.rawalloc); /* free the newly allocated name buffer */
+ strcpy(conn->ip_addr_str, old_conn->ip_addr_str);
+
/* re-use init */
conn->bits.reuse = TRUE; /* yes, we're re-using here */
@@ -4925,12 +4927,6 @@ static CURLcode create_conn(struct SessionHandle *data,
infof(data, "Re-using existing connection! (#%ld) with host %s\n",
conn->connectindex,
conn->proxy.name?conn->proxy.dispname:conn->host.dispname);
- /* copy this IP address to the common buffer for the easy handle so that
- the address can actually survice the removal of this connection. strcpy
- is safe since the target buffer is big enough to hold the largest
- possible IP address */
- strcpy(data->info.ip, conn->ip_addr_str);
-
}
else {
/*