cfilters: rename close/connect functions to avoid clashes

Rename `close` and `connect` in `struct Curl_cftype` for
consistency and to avoid clashes with macros of the same name
(the standard AmigaOS networking connect() function is implemented
via a macro).

Closes #11491
This commit is contained in:
Futaura 2023-07-20 18:07:49 +01:00 committed by Daniel Stenberg
parent f9314f317f
commit 7ad4c9066e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
9 changed files with 20 additions and 20 deletions

View File

@ -1074,7 +1074,7 @@ static CURLcode cf_h1_proxy_connect(struct Curl_cfilter *cf,
}
DEBUGF(LOG_CF(data, cf, "connect"));
result = cf->next->cft->connect(cf->next, data, blocking, done);
result = cf->next->cft->do_connect(cf->next, data, blocking, done);
if(result || !*done)
return result;
@ -1146,7 +1146,7 @@ static void cf_h1_proxy_close(struct Curl_cfilter *cf,
h1_tunnel_go_state(cf, cf->ctx, H1_TUNNEL_INIT, data);
}
if(cf->next)
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
}

View File

@ -115,7 +115,7 @@ static CURLcode cf_haproxy_connect(struct Curl_cfilter *cf,
return CURLE_OK;
}
result = cf->next->cft->connect(cf->next, data, blocking, done);
result = cf->next->cft->do_connect(cf->next, data, blocking, done);
if(result || !*done)
return result;
@ -168,7 +168,7 @@ static void cf_haproxy_close(struct Curl_cfilter *cf,
cf->connected = FALSE;
cf_haproxy_ctx_reset(cf->ctx);
if(cf->next)
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
}
static int cf_haproxy_get_select_socks(struct Curl_cfilter *cf,

View File

@ -432,7 +432,7 @@ static void cf_hc_close(struct Curl_cfilter *cf, struct Curl_easy *data)
cf->connected = FALSE;
if(cf->next) {
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
Curl_conn_cf_discard_chain(&cf->next, data);
}
}

View File

@ -50,7 +50,7 @@ void Curl_cf_def_close(struct Curl_cfilter *cf, struct Curl_easy *data)
{
cf->connected = FALSE;
if(cf->next)
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
}
#endif
@ -161,7 +161,7 @@ void Curl_conn_close(struct Curl_easy *data, int index)
/* it is valid to call that without filters being present */
cf = data->conn->cfilter[index];
if(cf) {
cf->cft->close(cf, data);
cf->cft->do_close(cf, data);
}
}
@ -293,14 +293,14 @@ CURLcode Curl_conn_cf_connect(struct Curl_cfilter *cf,
bool blocking, bool *done)
{
if(cf)
return cf->cft->connect(cf, data, blocking, done);
return cf->cft->do_connect(cf, data, blocking, done);
return CURLE_FAILED_INIT;
}
void Curl_conn_cf_close(struct Curl_cfilter *cf, struct Curl_easy *data)
{
if(cf)
cf->cft->close(cf, data);
cf->cft->do_close(cf, data);
}
int Curl_conn_cf_get_select_socks(struct Curl_cfilter *cf,
@ -348,7 +348,7 @@ CURLcode Curl_conn_connect(struct Curl_easy *data,
*done = cf->connected;
if(!*done) {
result = cf->cft->connect(cf, data, blocking, done);
result = cf->cft->do_connect(cf, data, blocking, done);
if(!result && *done) {
Curl_conn_ev_update_info(data, data->conn);
conn_report_connect_stats(data, data->conn);

View File

@ -168,8 +168,8 @@ struct Curl_cftype {
int flags; /* flags of filter type */
int log_level; /* log level for such filters */
Curl_cft_destroy_this *destroy; /* destroy resources of this cf */
Curl_cft_connect *connect; /* establish connection */
Curl_cft_close *close; /* close conn */
Curl_cft_connect *do_connect; /* establish connection */
Curl_cft_close *do_close; /* close conn */
Curl_cft_get_host *get_host; /* host filter talks to */
Curl_cft_get_select_socks *get_select_socks;/* sockets to select on */
Curl_cft_data_pending *has_data_pending;/* conn has data pending */

View File

@ -937,7 +937,7 @@ static void cf_he_close(struct Curl_cfilter *cf,
ctx->state = SCFST_INIT;
if(cf->next) {
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
Curl_conn_cf_discard_chain(&cf->next, data);
}
}
@ -1291,7 +1291,7 @@ static void cf_setup_close(struct Curl_cfilter *cf,
ctx->state = CF_SETUP_INIT;
if(cf->next) {
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
Curl_conn_cf_discard_chain(&cf->next, data);
}
}

View File

@ -71,7 +71,7 @@ static CURLcode http_proxy_cf_connect(struct Curl_cfilter *cf,
DEBUGF(LOG_CF(data, cf, "connect"));
connect_sub:
result = cf->next->cft->connect(cf->next, data, blocking, done);
result = cf->next->cft->do_connect(cf->next, data, blocking, done);
if(result || !*done)
return result;
@ -181,7 +181,7 @@ static void http_proxy_cf_close(struct Curl_cfilter *cf,
ctx->cf_protocol = NULL;
}
if(cf->next)
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
}

View File

@ -1115,7 +1115,7 @@ static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf,
return CURLE_OK;
}
result = cf->next->cft->connect(cf->next, data, blocking, done);
result = cf->next->cft->do_connect(cf->next, data, blocking, done);
if(result || !*done)
return result;
@ -1193,7 +1193,7 @@ static void socks_proxy_cf_close(struct Curl_cfilter *cf,
DEBUGASSERT(cf->next);
cf->connected = FALSE;
socks_proxy_cf_free(cf);
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
}
static void socks_proxy_cf_destroy(struct Curl_cfilter *cf,

View File

@ -1504,7 +1504,7 @@ static void ssl_cf_close(struct Curl_cfilter *cf,
CF_DATA_SAVE(save, cf, data);
cf_close(cf, data);
cf->next->cft->close(cf->next, data);
cf->next->cft->do_close(cf->next, data);
CF_DATA_RESTORE(cf, save);
}
@ -1528,7 +1528,7 @@ static CURLcode ssl_cf_connect(struct Curl_cfilter *cf,
DEBUGASSERT(connssl);
DEBUGASSERT(cf->conn->host.name);
result = cf->next->cft->connect(cf->next, data, blocking, done);
result = cf->next->cft->do_connect(cf->next, data, blocking, done);
if(result || !*done)
goto out;