summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-02-28 11:36:26 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-02-28 20:47:48 +0100
commita5ae6bf50c54efb76a95b07f1acfa79c47913382 (patch)
treea64e657fbf04b097bbe84f993a7253ba6ba31d56 /lib/url.c
parent64d598d91d1b69305e17fcb0b7cde15f5a50aff2 (diff)
downloadcurl-bagder/simplify-bytecounters.tar.gz
urldata: simplify bytecountersbagder/simplify-bytecounters
- no need to have them protocol specific - no need to set pointers to them with the Curl_setup_transfer() call - make Curl_setup_transfer() operate on a transfer pointer, not connection - switch some counters from long to the more proper curl_off_t type Closes #3627
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index ecabe491f..3b4ff3ee7 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3796,9 +3796,8 @@ static CURLcode create_conn(struct Curl_easy *data,
(void)conn->handler->done(conn, result, FALSE);
goto out;
}
-
- Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
- -1, NULL); /* no upload */
+ Curl_attach_connnection(data, conn);
+ Curl_setup_transfer(data, -1, -1, FALSE, -1);
}
/* since we skip do_init() */
@@ -4178,7 +4177,8 @@ CURLcode Curl_connect(struct Curl_easy *data,
connectdata struct, free those here */
Curl_disconnect(data, conn, TRUE);
}
- else
+ else if(!data->conn)
+ /* FILE: transfers already have the connection attached */
Curl_attach_connnection(data, conn);
return result;