dovecot-2.2: lib: o_stream_send_istream() should return -1 if th...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 9 15:15:35 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/5e53b6d55f63
changeset: 17921:5e53b6d55f63
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 09 18:12:46 2014 +0300
description:
lib: o_stream_send_istream() should return -1 if there was an error reading input stream.

diffstat:

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

diffs (12 lines):

diff -r d162eabd72cc -r 5e53b6d55f63 src/lib/ostream.c
--- a/src/lib/ostream.c	Thu Oct 09 18:12:14 2014 +0300
+++ b/src/lib/ostream.c	Thu Oct 09 18:12:46 2014 +0300
@@ -369,6 +369,8 @@
 		(void)i_stream_read_data(instream, &data, &iov.iov_len, 0);
 		if (iov.iov_len == 0) {
 			/* all sent */
+			if (instream->stream_errno != 0)
+				return -1;
 			break;
 		}
 


More information about the dovecot-cvs mailing list