dovecot-2.2: ostream-buffer: Fixed o_stream_sendv() with multipl...

dovecot at dovecot.org dovecot at dovecot.org
Fri Dec 7 05:54:04 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/67448d683720
changeset: 15455:67448d683720
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Dec 07 05:53:53 2012 +0200
description:
ostream-buffer: Fixed o_stream_sendv() with multiple iovs.
Patch by Stephan Bosch

diffstat:

 src/lib/ostream-buffer.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r b61b94be996e -r 67448d683720 src/lib/ostream-buffer.c
--- a/src/lib/ostream-buffer.c	Wed Dec 05 07:57:35 2012 +0200
+++ b/src/lib/ostream-buffer.c	Fri Dec 07 05:53:53 2012 +0200
@@ -40,11 +40,11 @@
 		n = I_MIN(left, iov[i].iov_len);
 		buffer_write(bstream->buf, stream->ostream.offset,
 			     iov[i].iov_base, n);
+		stream->ostream.offset += n;
 		ret += n;
 		if (n != iov[i].iov_len)
 			break;
 	}
-	stream->ostream.offset += ret;
 	return ret;
 }
 


More information about the dovecot-cvs mailing list