]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: Remove input_handler flag
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 26 Sep 2016 10:55:17 +0000 (13:55 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Tue, 31 Oct 2017 15:35:48 +0000 (17:35 +0200)
It is no longer needed after 87da941c

src/lib-ssl-iostream/iostream-openssl.c
src/lib-ssl-iostream/iostream-openssl.h
src/lib-ssl-iostream/istream-openssl.c

index 19a8614578631691146ae3fefa1ea6b5cf75ce37..5aa0755614fe3c922371f42c9336758f2810bb80 100644 (file)
@@ -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;
index 9d7e958c90d984322e3766ec4d5218207115793d..7e874f59b83a5a0a87721ab1671eaac81fa65814 100644 (file)
@@ -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;
 };
index f895a415920172e4a01c9989353be01240e55d26..12f479c17e45e50ed1b45d17b1f4c58991d5c98d 100644 (file)
@@ -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;
 }