From: Timo Sirainen Date: Thu, 9 Oct 2014 15:12:46 +0000 (+0300) Subject: lib: o_stream_send_istream() should return -1 if there was an error reading input... X-Git-Tag: 2.2.14~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db3ebf659c17fc5ca348a997e6311d20cfbb78e9;p=thirdparty%2Fdovecot%2Fcore.git lib: o_stream_send_istream() should return -1 if there was an error reading input stream. --- diff --git a/src/lib/ostream.c b/src/lib/ostream.c index 23ccb18509..4c34aed767 100644 --- a/src/lib/ostream.c +++ b/src/lib/ostream.c @@ -369,6 +369,8 @@ off_t io_stream_copy(struct ostream *outstream, struct istream *instream) (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; }