Skip to content

Commit

Permalink
vtls: remove unusued 'check_cxn' from TLS handler struct
Browse files Browse the repository at this point in the history
The last use was removed in 7c5637b

Closes #15775
  • Loading branch information
bagder committed Dec 18, 2024
1 parent 2bf48b4 commit 8654915
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 31 deletions.
1 change: 0 additions & 1 deletion lib/vtls/bearssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@ const struct Curl_ssl Curl_ssl_bearssl = {
NULL, /* init */
NULL, /* cleanup */
bearssl_version, /* version */
NULL, /* check_cxn */
bearssl_shutdown, /* shutdown */
bearssl_data_pending, /* data_pending */
bearssl_random, /* random */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/gtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,6 @@ const struct Curl_ssl Curl_ssl_gnutls = {
gtls_init, /* init */
gtls_cleanup, /* cleanup */
gtls_version, /* version */
NULL, /* check_cxn */
gtls_shutdown, /* shutdown */
gtls_data_pending, /* data_pending */
gtls_random, /* random */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,6 @@ const struct Curl_ssl Curl_ssl_mbedtls = {
mbedtls_init, /* init */
mbedtls_cleanup, /* cleanup */
mbedtls_version, /* version */
NULL, /* check_cxn */
mbedtls_shutdown, /* shutdown */
mbedtls_data_pending, /* data_pending */
mbedtls_random, /* random */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5337,7 +5337,6 @@ const struct Curl_ssl Curl_ssl_openssl = {
ossl_init, /* init */
ossl_cleanup, /* cleanup */
ossl_version, /* version */
NULL, /* check_cxn */
ossl_shutdown, /* shutdown */
ossl_data_pending, /* data_pending */
ossl_random, /* random */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/rustls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,6 @@ const struct Curl_ssl Curl_ssl_rustls = {
NULL, /* init */
NULL, /* cleanup */
cr_version, /* version */
NULL, /* check_cxn */
cr_shutdown, /* shutdown */
cr_data_pending, /* data_pending */
cr_random, /* random */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/schannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,6 @@ const struct Curl_ssl Curl_ssl_schannel = {
schannel_init, /* init */
schannel_cleanup, /* cleanup */
schannel_version, /* version */
NULL, /* check_cxn */
schannel_shutdown, /* shutdown */
schannel_data_pending, /* data_pending */
schannel_random, /* random */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/sectransp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,6 @@ const struct Curl_ssl Curl_ssl_sectransp = {
NULL, /* init */
NULL, /* cleanup */
sectransp_version, /* version */
NULL, /* check_cxn */
sectransp_shutdown, /* shutdown */
sectransp_data_pending, /* data_pending */
sectransp_random, /* random */
Expand Down
22 changes: 0 additions & 22 deletions lib/vtls/vtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,6 @@ static const struct Curl_ssl Curl_ssl_multi = {
multissl_init, /* init */
NULL, /* cleanup */
multissl_version, /* version */
NULL, /* check_cxn */
NULL, /* shutdown */
NULL, /* data_pending */
NULL, /* random */
Expand Down Expand Up @@ -1825,30 +1824,9 @@ static CURLcode ssl_cf_query(struct Curl_cfilter *cf,
static bool cf_ssl_is_alive(struct Curl_cfilter *cf, struct Curl_easy *data,
bool *input_pending)
{
int result = -1;
/*
* This function tries to determine connection status.
*
* Return codes:
* 1 means the connection is still in place
* 0 means the connection has been closed
* -1 means the connection status is unknown
*/
if(Curl_ssl->check_cxn) {
struct cf_call_data save;
CF_DATA_SAVE(save, cf, data);
result = Curl_ssl->check_cxn(cf, data);
CF_DATA_RESTORE(cf, save);
}
if(result > 0) {
*input_pending = TRUE;
return TRUE;
}
if(result == 0) {
*input_pending = FALSE;
return FALSE;
}
/* ssl backend does not know */
return cf->next ?
cf->next->cft->is_alive(cf->next, data, input_pending) :
FALSE; /* pessimistic in absence of data */
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/vtls_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ struct Curl_ssl {
void (*cleanup)(void);

size_t (*version)(char *buffer, size_t size);
int (*check_cxn)(struct Curl_cfilter *cf, struct Curl_easy *data);
CURLcode (*shut_down)(struct Curl_cfilter *cf, struct Curl_easy *data,
bool send_shutdown, bool *done);
bool (*data_pending)(struct Curl_cfilter *cf,
Expand Down
1 change: 0 additions & 1 deletion lib/vtls/wolfssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,6 @@ const struct Curl_ssl Curl_ssl_wolfssl = {
wolfssl_init, /* init */
wolfssl_cleanup, /* cleanup */
wolfssl_version, /* version */
NULL, /* check_cxn */
wolfssl_shutdown, /* shutdown */
wolfssl_data_pending, /* data_pending */
wolfssl_random, /* random */
Expand Down

0 comments on commit 8654915

Please sign in to comment.