lib: eliminate conn->cselect_bits

- use `data->state.dselect_bits` everywhere instead
- remove `bool *comeback` parameter as non-zero
  `data->state.dselect_bits` will indicate that IO is
  incomplete.

Closes #12512
This commit is contained in:
Stefan Eissing 2023-12-13 11:25:20 +01:00 committed by Daniel Stenberg
parent 0f052808b3
commit 8706b68010
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
14 changed files with 40 additions and 59 deletions

View file

@ -1370,7 +1370,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _sending_ function even when the socket turns
out readable as the underlying libssh sftp send function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_OUT;
data->state.select_bits = CURL_CSELECT_OUT;
/* since we don't really wait for anything at this point, we want the
state machine to move on as soon as possible so we set a very short
@ -1740,7 +1740,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _receiving_ function even when the socket turns
out writableable as the underlying libssh recv function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
data->state.select_bits = CURL_CSELECT_IN;
if(result) {
/* this should never occur; the close state should be entered
@ -1868,7 +1868,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _sending_ function even when the socket turns
out readable as the underlying libssh scp send function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_OUT;
data->state.select_bits = CURL_CSELECT_OUT;
state(data, SSH_STOP);
@ -1908,7 +1908,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _receiving_ function even when the socket turns
out writableable as the underlying libssh recv function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
data->state.select_bits = CURL_CSELECT_IN;
state(data, SSH_STOP);
break;

View file

@ -2213,7 +2213,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _sending_ function even when the socket turns
out readable as the underlying libssh2 sftp send function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_OUT;
data->state.select_bits = CURL_CSELECT_OUT;
/* since we don't really wait for anything at this point, we want the
state machine to move on as soon as possible so we set a very short
@ -2602,7 +2602,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _receiving_ function even when the socket turns
out writableable as the underlying libssh2 recv function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
data->state.select_bits = CURL_CSELECT_IN;
if(result) {
/* this should never occur; the close state should be entered
@ -2757,7 +2757,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _sending_ function even when the socket turns
out readable as the underlying libssh2 scp send function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_OUT;
data->state.select_bits = CURL_CSELECT_OUT;
state(data, SSH_STOP);
}
@ -2819,7 +2819,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _receiving_ function even when the socket turns
out writableable as the underlying libssh2 recv function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
data->state.select_bits = CURL_CSELECT_IN;
if(result) {
state(data, SSH_SCP_CHANNEL_FREE);

View file

@ -694,7 +694,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _sending_ function even when the socket turns
out readable as the underlying libssh2 sftp send function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_OUT;
data->state.select_bits = CURL_CSELECT_OUT;
/* since we don't really wait for anything at this point, we want the
state machine to move on as soon as possible so we set a very short
@ -790,7 +790,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
/* we want to use the _receiving_ function even when the socket turns
out writableable as the underlying libssh2 recv function will deal
with both accordingly */
conn->cselect_bits = CURL_CSELECT_IN;
data->state.select_bits = CURL_CSELECT_IN;
if(result) {
/* this should never occur; the close state should be entered