dovecot-2.2: lib: i_stream_read_copy_from_parent() needs to upda...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 7 10:17:05 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/1a38a85d952e
changeset: 17607:1a38a85d952e
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 07 13:15:33 2014 +0300
description:
lib: i_stream_read_copy_from_parent() needs to update access counter also when returning -2
This finishes the 467a4d19f873 fix.

diffstat:

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

diffs (15 lines):

diff -r f1d29866e147 -r 1a38a85d952e src/lib/istream.c
--- a/src/lib/istream.c	Sun Jul 06 19:08:59 2014 +0300
+++ b/src/lib/istream.c	Mon Jul 07 13:15:33 2014 +0300
@@ -207,8 +207,10 @@
 	if (pos > stream->pos)
 		ret = 0;
 	else do {
-		if ((ret = i_stream_read(stream->parent)) == -2)
+		if ((ret = i_stream_read(stream->parent)) == -2) {
+			i_stream_update(stream);
 			return -2;
+		}
 
 		stream->istream.stream_errno = stream->parent->stream_errno;
 		stream->istream.eof = stream->parent->eof;


More information about the dovecot-cvs mailing list