mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:43:31 +03:00
lib: remove 'conn->data' completely
The Curl_easy pointer struct entry in connectdata is now gone. Just
before commit 215db086e0 landed on January 8, 2021 there were 919
references to conn->data.
Closes #6608
This commit is contained in:
parent
a59c33ceff
commit
cfff12a0b3
7 changed files with 26 additions and 79 deletions
12
lib/easy.c
12
lib/easy.c
|
|
@ -1052,8 +1052,6 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
|
|||
unsigned int i;
|
||||
unsigned int count = data->state.tempcount;
|
||||
struct tempbuf writebuf[3]; /* there can only be three */
|
||||
struct connectdata *conn = data->conn;
|
||||
struct Curl_easy *saved_data = NULL;
|
||||
|
||||
/* copy the structs to allow for immediate re-pausing */
|
||||
for(i = 0; i < data->state.tempcount; i++) {
|
||||
|
|
@ -1062,12 +1060,6 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
|
|||
}
|
||||
data->state.tempcount = 0;
|
||||
|
||||
/* set the connection's current owner */
|
||||
if(conn->data != data) {
|
||||
saved_data = conn->data;
|
||||
conn->data = data;
|
||||
}
|
||||
|
||||
for(i = 0; i < count; i++) {
|
||||
/* even if one function returns error, this loops through and frees
|
||||
all buffers */
|
||||
|
|
@ -1078,10 +1070,6 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
|
|||
Curl_dyn_free(&writebuf[i].b);
|
||||
}
|
||||
|
||||
/* recover previous owner of the connection */
|
||||
if(saved_data)
|
||||
conn->data = saved_data;
|
||||
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue