dovecot-2.0-sslstream: mbox: Don't close input stream when synci...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:56:00 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/77b704cda90b
changeset: 10252:77b704cda90b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 05 14:28:47 2009 -0500
description:
mbox: Don't close input stream when syncing. This breaks copying.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/lib-storage/index/mbox/mbox-sync.c |    7 +++++--

diffs (17 lines):

diff -r f69c5c25f176 -r 77b704cda90b src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c	Thu Nov 05 14:13:00 2009 -0500
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Thu Nov 05 14:28:47 2009 -0500
@@ -1763,8 +1763,11 @@ static int mbox_sync_int(struct mbox_mai
 		*lock_id = 0;
 	}
 
-	/* reopen input stream to make sure it has nothing buffered */
-        mbox_file_close_stream(mbox);
+	/* flush input streams' buffers */
+	if (mbox->mbox_stream != NULL)
+		i_stream_sync(mbox->mbox_stream);
+	if (mbox->mbox_file_stream != NULL)
+		i_stream_sync(mbox->mbox_file_stream);
 
 again:
 	if (changed) {


More information about the dovecot-cvs mailing list