From e5941b2ce963a9175e918029cb6973a7265976e2 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 16 May 2023 21:16:33 +0200 Subject: [PATCH] Drop unused le_ssl_ops::err_is_ok It is not used anymore since errors are ignored if some progress had been done. --- bufferevent_mbedtls.c | 6 ------ bufferevent_openssl.c | 8 -------- ssl-compat.h | 1 - 3 files changed, 15 deletions(-) diff --git a/bufferevent_mbedtls.c b/bufferevent_mbedtls.c index 765d00be..b0e960fa 100644 --- a/bufferevent_mbedtls.c +++ b/bufferevent_mbedtls.c @@ -136,11 +136,6 @@ mbedtls_is_want_write(int err) { return err == MBEDTLS_ERR_SSL_WANT_WRITE; } -static int mbedtls_err_is_ok(int err) -{ - /* What mbedtls_ssl_read() returns when the we can proceed existing data */ - return err == 0; -} static evutil_socket_t be_mbedtls_get_fd(void *ssl) @@ -329,7 +324,6 @@ static struct le_ssl_ops le_mbedtls_ops = { mbedtls_handshake_is_ok, mbedtls_is_want_read, mbedtls_is_want_write, - mbedtls_err_is_ok, be_mbedtls_get_fd, be_mbedtls_bio_set_fd, (void (*)(struct bufferevent_ssl *))mbedtls_set_ssl_noops, diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index 4ef3925a..f5d0808c 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -345,13 +345,6 @@ SSL_handshake_is_ok(int err) return err == 1; } -static int -SSL_err_is_ok(int err) -{ - /* What SSL_read() returns when the we can proceed existing data */ - return err == SSL_ERROR_ZERO_RETURN; -} - static int SSL_is_want_read(int err) { @@ -424,7 +417,6 @@ static struct le_ssl_ops le_openssl_ops = { SSL_handshake_is_ok, SSL_is_want_read, SSL_is_want_write, - SSL_err_is_ok, (int (*)(void *))be_openssl_get_fd, be_openssl_bio_set_fd, init_bio_counts, diff --git a/ssl-compat.h b/ssl-compat.h index 146fdaf3..a556f4c0 100644 --- a/ssl-compat.h +++ b/ssl-compat.h @@ -23,7 +23,6 @@ struct le_ssl_ops { int (*handshake_is_ok)(int err); int (*err_is_want_read)(int err); int (*err_is_want_write)(int err); - int (*err_is_ok)(int err); evutil_socket_t (*get_fd)(void *ssl); int (*bio_set_fd)(struct bufferevent_ssl *ssl, evutil_socket_t fd); void (*init_bio_counts)(struct bufferevent_ssl *bev);