changeset 17921:5e53b6d55f63

lib: o_stream_send_istream() should return -1 if there was an error reading input stream.
author Timo Sirainen <tss@iki.fi>
date Thu, 09 Oct 2014 18:12:46 +0300
parents d162eabd72cc
children 00115d4930d4
files src/lib/ostream.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 		}