]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: ostream-metawrap didn't update the output stream's offset
authorTimo Sirainen <tss@iki.fi>
Thu, 27 Mar 2014 15:00:49 +0000 (16:00 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 27 Mar 2014 15:00:49 +0000 (16:00 +0100)
src/lib-fs/ostream-metawrap.c

index ae666b5aa39dc455a628f6e0a7d6307cefb2577d..1d324e10f74e320dead6620f6fe59d71ab14d14a 100644 (file)
@@ -30,6 +30,8 @@ o_stream_metawrap_sendv(struct ostream_private *stream,
        o_stream_metawrap_call_callback(mstream);
        if ((ret = o_stream_sendv(stream->parent, iov, iov_count)) < 0)
                o_stream_copy_error_from_parent(stream);
+       else
+               stream->ostream.offset += ret;
        return ret;
 }
 
@@ -44,6 +46,8 @@ o_stream_metawrap_send_istream(struct ostream_private *_outstream,
        o_stream_metawrap_call_callback(outstream);
        if ((ret = o_stream_send_istream(_outstream->parent, instream)) < 0)
                o_stream_copy_error_from_parent(_outstream);
+       else
+               _outstream->ostream.offset += ret;
        return ret;
 }