From: Timo Sirainen Date: Wed, 21 Sep 2011 12:54:06 +0000 (+0300) Subject: lib-ssl-iostream: If flush wants to read, make sure the flush callback isn't being... X-Git-Tag: 2.1.beta1~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96f071012c4afc923890009398e8e5a59a693c58;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: If flush wants to read, make sure the flush callback isn't being called again. --- diff --git a/src/lib-ssl-iostream/ostream-openssl.c b/src/lib-ssl-iostream/ostream-openssl.c index 8a1904a984..12fab29452 100644 --- a/src/lib-ssl-iostream/ostream-openssl.c +++ b/src/lib-ssl-iostream/ostream-openssl.c @@ -119,6 +119,8 @@ static int o_stream_ssl_flush(struct ostream_private *stream) if (ret == 0 && sstream->ssl_io->want_read) { /* we need to read more data until we can continue. */ + o_stream_set_flush_pending(sstream->ssl_io->plain_output, + FALSE); sstream->ssl_io->ostream_flush_waiting_input = TRUE; ret = 1; }