]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Call o_stream_copy_error_from_parent() only on errors
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Sep 2021 15:59:21 +0000 (18:59 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 30 Sep 2021 17:08:11 +0000 (17:08 +0000)
src/lib-http/http-transfer-chunked.c
src/lib-mail/ostream-dot.c

index 5ad946df4d2ff237495b19242942f46630eab66f..0e9099204e919807f0bec14b4caba63a8afe16ae 100644 (file)
@@ -673,7 +673,8 @@ http_transfer_chunked_ostream_sendv(struct ostream_private *stream,
        if ((ret = o_stream_flush(stream->parent)) <= 0) {
                /* error / we still couldn't flush existing data to
                   parent stream. */
-               o_stream_copy_error_from_parent(stream);
+               if (ret < 0)
+                       o_stream_copy_error_from_parent(stream);
                return ret;
        }
 
index 678ffd37117f8aa7e8387575b4a7267ef699d65c..f5bfa72e20be173e959ad16e060507203d8eca77 100644 (file)
@@ -87,7 +87,8 @@ o_stream_dot_sendv(struct ostream_private *stream,
        if ((ret=o_stream_flush(stream->parent)) <= 0) {
                /* error / we still couldn't flush existing data to
                   parent stream. */
-               o_stream_copy_error_from_parent(stream);
+               if (ret < 0)
+                       o_stream_copy_error_from_parent(stream);
                return ret;
        }