dovecot-2.2: istream-chain: Final fixes to handling merged streams.

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 4 22:09:10 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/0f88312ef951
changeset: 16173:0f88312ef951
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 04 22:09:02 2013 +0300
description:
istream-chain: Final fixes to handling merged streams.

diffstat:

 src/lib/istream-chain.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 29fdc9ff273d -r 0f88312ef951 src/lib/istream-chain.c
--- a/src/lib/istream-chain.c	Thu Apr 04 21:46:59 2013 +0300
+++ b/src/lib/istream-chain.c	Thu Apr 04 22:09:02 2013 +0300
@@ -119,7 +119,7 @@
 	if (link != NULL && link->stream != NULL)
 		i_stream_seek(link->stream, 0);
 
-	if (cstream->istream.buffer == cstream->istream.w_buffer) {
+	if (cstream->prev_stream_left > 0) {
 		/* we've already buffered some of the prev_input. continue
 		   appending the rest to it. */
 		cur_data_pos = cstream->istream.pos -
@@ -145,7 +145,7 @@
 	cstream->istream.pos += data_size;
 	cstream->prev_stream_left += data_size;
 
-	i_stream_skip(prev_input, data_size);
+	i_stream_skip(prev_input, i_stream_get_data_size(prev_input));
 	i_stream_unref(&prev_input);
 }
 


More information about the dovecot-cvs mailing list