aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-04-22 16:47:55 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-04-22 16:47:55 +0000
commit2cf26d4fb7e8a15a08f5922ba0a46b7332d3fdc4 (patch)
tree115664124b5cbf37e0e455da5e55a9fbd1d9cc56
parentf470a131a69dfea3104a7b779923135372edf2e2 (diff)
copy the name properly when re-using a connection
-rw-r--r--lib/url.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 4fa180dea..44d4adef4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2022,8 +2022,9 @@ static CURLcode Connect(struct UrlData *data,
free(conn->path); /* free the previous path pointer */
/* we need these pointers if we speak over a proxy */
- conn->name = old_conn->name;
- conn->hostname = old_conn->hostname;
+ strcpy(conn->gname, old_conn->gname); /* copy the name */
+ conn->name = conn->gname;
+ conn->hostname = old_conn->gname;
conn->path = path; /* use this one */
conn->ppath = path; /* set this too */