dovecot-2.2: istream-seekable: Fixed handling "buffer full" i_st...

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 9 23:54:58 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/fbef40826602
changeset: 16257:fbef40826602
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 09 23:54:52 2013 +0300
description:
istream-seekable: Fixed handling "buffer full" i_stream_read() result from underlying streams.

diffstat:

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

diffs (12 lines):

diff -r 194df093a05f -r fbef40826602 src/lib/istream-seekable.c
--- a/src/lib/istream-seekable.c	Tue Apr 09 14:17:56 2013 +0300
+++ b/src/lib/istream-seekable.c	Tue Apr 09 23:54:52 2013 +0300
@@ -254,7 +254,7 @@
 	if (stream->istream.v_offset + stream->pos == sstream->write_peak) {
 		/* need to read more */
 		ret = read_more(sstream);
-		if (ret <= 0)
+		if (ret == -1 || ret == 0)
 			return ret;
 
 		/* save to our file */


More information about the dovecot-cvs mailing list