dovecot-2.2: i_stream_create(): Copy stream_errno/eof immediatel...

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 4 20:18:39 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/e7d682358619
changeset: 15726:e7d682358619
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 04 20:14:16 2013 +0200
description:
i_stream_create(): Copy stream_errno/eof immediately from the parent stream.
This makes wrapper istream behavior more reliable when the original istream
is an istream-error.

diffstat:

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

diffs (13 lines):

diff -r d4bf15bbf182 -r e7d682358619 src/lib/istream.c
--- a/src/lib/istream.c	Mon Feb 04 20:13:26 2013 +0200
+++ b/src/lib/istream.c	Mon Feb 04 20:14:16 2013 +0200
@@ -666,6 +666,9 @@
 		_stream->parent_expected_offset = parent->v_offset;
 		_stream->abs_start_offset = parent->v_offset +
 			parent->real_stream->abs_start_offset;
+		/* if parent stream is an istream-error, copy the error */
+		_stream->istream.stream_errno = parent->stream_errno;
+		_stream->istream.eof = parent->eof;
 		i_stream_ref(parent);
 	}
 	_stream->istream.real_stream = _stream;


More information about the dovecot-cvs mailing list