CF_CTRL_DATA_SETUP, 0, NULL);
}
-CURLcode Curl_conn_ev_data_idle(struct Curl_easy *data)
-{
- return cf_cntrl_all(data->conn, data, FALSE,
- CF_CTRL_DATA_IDLE, 0, NULL);
-}
-
-
CURLcode Curl_conn_flush(struct Curl_easy *data, int sockindex)
{
if(!CONN_SOCK_IDX_VALID(sockindex))
*/
/* data event arg1 arg2 return */
#define CF_CTRL_DATA_SETUP 4 /* 0 NULL first fail */
-#define CF_CTRL_DATA_IDLE 5 /* 0 NULL first fail */
+/* unused now 5 */
#define CF_CTRL_DATA_PAUSE 6 /* on/off NULL first fail */
#define CF_CTRL_DATA_DONE 7 /* premature NULL ignored */
#define CF_CTRL_DATA_DONE_SEND 8 /* 0 NULL ignored */
*/
CURLcode Curl_conn_ev_data_setup(struct Curl_easy *data);
-/**
- * Notify connection filters that now would be a good time to
- * perform any idle, e.g. time related, actions.
- */
-CURLcode Curl_conn_ev_data_idle(struct Curl_easy *data);
-
/**
* Notify connection filters that the transfer represented by `data`
* is done with sending data (e.g. has uploaded everything).
* buffer)
*/
static CURLcode sendrecv_dl(struct Curl_easy *data,
- struct SingleRequest *k,
- int *didwhat)
+ struct SingleRequest *k)
{
struct connectdata *conn = data->conn;
CURLcode result = CURLE_OK;
/* We only get a 0-length receive at the end of the response */
blen = (size_t)nread;
is_eos = (blen == 0);
- *didwhat |= KEEP_RECV;
if(!blen) {
/* if we receive 0 or less here, either the data transfer is done or the
/*
* Send data to upload to the server, when the socket is writable.
*/
-static CURLcode sendrecv_ul(struct Curl_easy *data, int *didwhat)
+static CURLcode sendrecv_ul(struct Curl_easy *data)
{
/* We should not get here when the sending is already done. It
* probably means that someone set `data-req.keepon |= KEEP_SEND`
* when it should not. */
DEBUGASSERT(!Curl_req_done_sending(data));
- if(!Curl_req_done_sending(data)) {
- *didwhat |= KEEP_SEND;
+ if(!Curl_req_done_sending(data))
return Curl_req_send_more(data);
- }
return CURLE_OK;
}
{
struct SingleRequest *k = &data->req;
CURLcode result = CURLE_OK;
- int didwhat = 0;
DEBUGASSERT(nowp);
if(Curl_xfer_is_blocked(data)) {
/* We go ahead and do a read if we have a readable socket or if the stream
was rewound (in which case we have data in a buffer) */
if(k->keepon & KEEP_RECV) {
- result = sendrecv_dl(data, k, &didwhat);
+ result = sendrecv_dl(data, k);
if(result || data->req.done)
goto out;
}
/* If we still have writing to do, we check if we have a writable socket. */
if(Curl_req_want_send(data) || (data->req.keepon & KEEP_SEND_TIMED)) {
- result = sendrecv_ul(data, &didwhat);
- if(result)
- goto out;
- }
-
- if(!didwhat) {
- /* Transfer wanted to send/recv, but nothing was possible. */
- result = Curl_conn_ev_data_idle(data);
+ result = sendrecv_ul(data);
if(result)
goto out;
}
}
break;
}
- case CF_CTRL_DATA_IDLE: {
- struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
- CURL_TRC_CF(data, cf, "data idle");
- if(stream && !stream->closed) {
- result = check_and_set_expiry(cf, data, NULL);
- if(result)
- CURL_TRC_CF(data, cf, "data idle, check_and_set_expiry -> %d", result);
- }
- break;
- }
case CF_CTRL_CONN_INFO_UPDATE:
if(!cf->sockindex && cf->connected) {
cf->conn->httpversion_seen = 30;
}
break;
}
- case CF_CTRL_DATA_IDLE: {
- struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
- CURL_TRC_CF(data, cf, "data idle");
- if(stream && !stream->closed) {
- result = check_and_set_expiry(cf, data);
- }
- break;
- }
case CF_CTRL_CONN_INFO_UPDATE:
if(!cf->sockindex && cf->connected) {
cf->conn->httpversion_seen = 30;
}
break;
}
- case CF_CTRL_DATA_IDLE: {
- struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
- if(stream && !stream->closed) {
- result = cf_flush_egress(cf, data);
- if(result)
- CURL_TRC_CF(data, cf, "data idle, flush egress -> %d", result);
- }
- break;
- }
case CF_CTRL_CONN_INFO_UPDATE:
if(!cf->sockindex && cf->connected) {
cf->conn->httpversion_seen = 30;