]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: o_stream_send_istream() should return -1 if there was an error reading input...
authorTimo Sirainen <tss@iki.fi>
Thu, 9 Oct 2014 15:12:46 +0000 (18:12 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 9 Oct 2014 15:12:46 +0000 (18:12 +0300)
src/lib/ostream.c

index 23ccb18509fb103c1c72ecf0e69e76a35e8f8a1b..4c34aed767d8e012fe313b64d8da90dd5496f256 100644 (file)
@@ -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;
                }