]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Don't set ostream buffer as blocking
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 18 May 2016 14:45:09 +0000 (17:45 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 14 Oct 2016 06:34:47 +0000 (09:34 +0300)
src/lib/ostream-buffer.c

index 75baa09cd4db0e1d52b58692e17ef7d3c316dcf9..13fb09da3344ff3b4650cb520138c7808392c4dc 100644 (file)
@@ -59,7 +59,9 @@ struct ostream *o_stream_create_buffer(buffer_t *buf)
        struct ostream *output;
 
        bstream = i_new(struct buffer_ostream, 1);
-       bstream->ostream.ostream.blocking = TRUE;
+       /* we don't set buffer as blocking, because if max_buffer_size is
+          changed it can get truncated. this is used in various places in
+          unit tests. */
        bstream->ostream.max_buffer_size = (size_t)-1;
        bstream->ostream.seek = o_stream_buffer_seek;
        bstream->ostream.sendv = o_stream_buffer_sendv;