dovecot-2.2: imap: CATENATE fix

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 29 20:00:22 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/8d95535af98e
changeset: 14976:8d95535af98e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 29 20:00:03 2012 +0300
description:
imap: CATENATE fix

diffstat:

 src/imap/cmd-append.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 03e0b100243d -r 8d95535af98e src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Wed Aug 29 19:59:42 2012 +0300
+++ b/src/imap/cmd-append.c	Wed Aug 29 20:00:03 2012 +0300
@@ -729,7 +729,11 @@
 	if (ctx->litinput->eof || client->input->closed) {
 		bool all_written = ctx->litinput->v_offset == ctx->literal_size;
 
-		/* finished */
+		/* finished - do one more read, to make sure istream-chain
+		   unreferences its stream, which is needed for litinput's
+		   unreferencing to seek the client->input to correct
+		   position */
+		(void)i_stream_read(ctx->input);
 		i_stream_unref(&ctx->litinput);
 
 		if (ctx->failed) {


More information about the dovecot-cvs mailing list