mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:23:44 +03:00
lib: keepon improving
Improve the name, type and handling of `data->req.keepon`: - Rename `keepon` to `io_flags` - make `io_flags` and `uint8_t` and reposition in struct - Rename `KEEP_*` defines to `REQ_IO_*`, move to request.h - Replace all direct bit tests to `CURL_REQ_WANT_*` use - Replace all direct bit manipulations with new macros Closes #20905
This commit is contained in:
parent
9325eb5fc4
commit
f50446f6da
13 changed files with 78 additions and 79 deletions
|
|
@ -1065,7 +1065,7 @@ static CURLcode mstate_perform_pollset(struct Curl_easy *data,
|
|||
if(conn->scheme->run->perform_pollset)
|
||||
result = conn->scheme->run->perform_pollset(data, ps);
|
||||
else {
|
||||
/* Default is to obey the data->req.keepon flags for send/recv */
|
||||
/* Default is to obey the request flags for send/recv */
|
||||
if(Curl_req_want_recv(data) && CONN_SOCK_IDX_VALID(conn->recv_idx)) {
|
||||
result = Curl_pollset_add_in(data, ps, conn->sock[conn->recv_idx]);
|
||||
}
|
||||
|
|
@ -1645,7 +1645,6 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi,
|
|||
|
||||
mresult = curl_multi_add_handle(multi, data);
|
||||
if(!mresult) {
|
||||
struct SingleRequest *k = &data->req;
|
||||
CURLcode result;
|
||||
|
||||
/* pass in NULL for 'conn' here since we do not want to init the
|
||||
|
|
@ -1659,7 +1658,7 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi,
|
|||
/* take this handle to the perform state right away */
|
||||
multistate(data, MSTATE_PERFORMING);
|
||||
Curl_attach_connection(data, conn);
|
||||
k->keepon |= KEEP_RECV; /* setup to receive! */
|
||||
CURL_REQ_SET_RECV(data);
|
||||
}
|
||||
return mresult;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue