From: Yann Ylavic Date: Fri, 26 Oct 2018 22:00:30 +0000 (+0000) Subject: mod_ssl: axe dead code. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=860f83d823e7f08157679720ac39d4f9f7e22901;p=thirdparty%2Fapache%2Fhttpd.git mod_ssl: axe dead code. No functional change, we never get there when *len > 0. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1844928 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index 37e8314b7ca..229f0c0f1f4 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -741,7 +741,7 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx, rc = SSL_read(inctx->filter_ctx->pssl, buf + bytes, wanted - bytes); if (rc > 0) { - *len += rc; + *len = rc; if (inctx->mode == AP_MODE_SPECULATIVE) { /* We want to rollback this read. */ char_buffer_write(inctx, buf, rc); @@ -754,28 +754,17 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx, if (rc == 0) { /* If EAGAIN, we will loop given a blocking read, * otherwise consider ourselves at EOF. + * On win32 in particular, but perhaps on other kernels, + * a blocking call isn't 'always' blocking. */ if (APR_STATUS_IS_EAGAIN(inctx->rc) || APR_STATUS_IS_EINTR(inctx->rc)) { - /* Already read something, return APR_SUCCESS instead. - * On win32 in particular, but perhaps on other kernels, - * a blocking call isn't 'always' blocking. - */ - if (*len > 0) { - inctx->rc = APR_SUCCESS; - break; - } if (inctx->block == APR_NONBLOCK_READ) { break; } } - else { - if (*len > 0) { - inctx->rc = APR_SUCCESS; - break; - } - } } + ssl_err = SSL_get_error(inctx->filter_ctx->pssl, rc); c = (conn_rec*)SSL_get_app_data(inctx->filter_ctx->pssl); @@ -790,10 +779,6 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx, */ inctx->rc = APR_EAGAIN; - if (*len > 0) { - inctx->rc = APR_SUCCESS; - break; - } if (inctx->block == APR_NONBLOCK_READ) { break; } @@ -802,11 +787,6 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx, else if (ssl_err == SSL_ERROR_SYSCALL) { if (APR_STATUS_IS_EAGAIN(inctx->rc) || APR_STATUS_IS_EINTR(inctx->rc)) { - /* Already read something, return APR_SUCCESS instead. */ - if (*len > 0) { - inctx->rc = APR_SUCCESS; - break; - } if (inctx->block == APR_NONBLOCK_READ) { break; }