diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-28 11:36:26 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-03-01 17:30:34 +0100 |
commit | 65eb65fde64bd5faff6d6a7740f9436336e290e0 (patch) | |
tree | 8470a15feed5069a8c17c17137fc54800d58418a /lib/url.c | |
parent | 8cf6c170cf310626f8008c25df71f43f2a9061a6 (diff) | |
download | curl-65eb65fde64bd5faff6d6a7740f9436336e290e0.tar.gz |
urldata: 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |