From: Aki Tuomi Date: Mon, 26 Sep 2016 10:55:17 +0000 (+0300) Subject: lib-ssl-iostream: Remove input_handler flag X-Git-Tag: 2.3.0.rc1~681 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca55f7e83f7646060748cfe14fed8ff0e565561b;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: Remove input_handler flag It is no longer needed after 87da941c --- diff --git a/src/lib-ssl-iostream/iostream-openssl.c b/src/lib-ssl-iostream/iostream-openssl.c index 19a8614578..5aa0755614 100644 --- a/src/lib-ssl-iostream/iostream-openssl.c +++ b/src/lib-ssl-iostream/iostream-openssl.c @@ -393,13 +393,6 @@ openssl_iostream_read_more(struct ssl_iostream *ssl_io, if (*size_r > 0) return 0; - if (!ssl_io->input_handler) { - /* read plain_input only when we came here from input handler. - this makes sure that we don't get stuck with some input - unexpectedly buffered. */ - return 0; - } - if (i_stream_read_more(ssl_io->plain_input, data_r, size_r) < 0) return -1; return 0; diff --git a/src/lib-ssl-iostream/iostream-openssl.h b/src/lib-ssl-iostream/iostream-openssl.h index 9d7e958c90..7e874f59b8 100644 --- a/src/lib-ssl-iostream/iostream-openssl.h +++ b/src/lib-ssl-iostream/iostream-openssl.h @@ -51,7 +51,6 @@ struct ssl_iostream { bool cert_received:1; bool cert_broken:1; bool want_read:1; - bool input_handler:1; bool ostream_flush_waiting_input:1; bool closed:1; }; diff --git a/src/lib-ssl-iostream/istream-openssl.c b/src/lib-ssl-iostream/istream-openssl.c index f895a41592..12f479c17e 100644 --- a/src/lib-ssl-iostream/istream-openssl.c +++ b/src/lib-ssl-iostream/istream-openssl.c @@ -93,7 +93,6 @@ static ssize_t i_stream_ssl_read_real(struct istream_private *stream) /* now make sure that we read everything already buffered in OpenSSL into the stream (without reading anything more). this makes I/O loop behave similarly for ssl-istream as file-istream. */ - sstream->ssl_io->input_handler = FALSE; stream->max_buffer_size = (size_t)-1; while ((ret = SSL_read(ssl_io->ssl, buffer, sizeof(buffer))) > 0) { memcpy(i_stream_alloc(stream, ret), buffer, ret); @@ -109,11 +108,9 @@ static ssize_t i_stream_ssl_read(struct istream_private *stream) struct ssl_istream *sstream = (struct ssl_istream *)stream; ssize_t ret; - sstream->ssl_io->input_handler = TRUE; if ((ret = i_stream_ssl_read_real(stream)) >= 0) { i_assert(i_stream_get_data_size(sstream->ssl_io->plain_input) == 0); } - sstream->ssl_io->input_handler = FALSE; return ret; }