mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:03:52 +03:00
lib: pass in 'struct Curl_easy *' to most functions
... in most cases instead of 'struct connectdata *' but in some cases in addition to. - We mostly operate on transfers and not connections. - We need the transfer handle to log, store data and more. Everything in libcurl is driven by a transfer (the CURL * in the public API). - This work clarifies and separates the transfers from the connections better. - We should avoid "conn->data". Since individual connections can be used by many transfers when multiplexing, making sure that conn->data points to the current and correct transfer at all times is difficult and has been notoriously error-prone over the years. The goal is to ultimately remove the conn->data pointer for this reason. Closes #6425
This commit is contained in:
parent
0d26ab9ed3
commit
215db086e0
76 changed files with 2852 additions and 2588 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -904,7 +904,7 @@ static CURLcode client_unencode_write(struct connectdata *conn,
|
|||
if(!nbytes || k->ignorebody)
|
||||
return CURLE_OK;
|
||||
|
||||
return Curl_client_write(conn, CLIENTWRITE_BODY, (char *) buf, nbytes);
|
||||
return Curl_client_write(data, CLIENTWRITE_BODY, (char *) buf, nbytes);
|
||||
}
|
||||
|
||||
static void client_close_writer(struct connectdata *conn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue