dovecot-2.0: dsync: Fixed potential crash with remote syncing.

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 20 16:47:44 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/a109e140bdf5
changeset: 11865:a109e140bdf5
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 20 14:47:39 2010 +0100
description:
dsync: Fixed potential crash with remote syncing.

diffstat:

 src/dsync/dsync-brain-msgs-new.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r cfda26381f58 -r a109e140bdf5 src/dsync/dsync-brain-msgs-new.c
--- a/src/dsync/dsync-brain-msgs-new.c	Tue Jul 20 13:00:08 2010 +0100
+++ b/src/dsync/dsync-brain-msgs-new.c	Tue Jul 20 14:47:39 2010 +0100
@@ -248,6 +248,8 @@
 {
 	struct dsync_brain_mailbox_sync *sync = iter->sync;
 
+	i_assert(sync->brain->state == DSYNC_STATE_SYNC_MSGS);
+
 	iter->msgs_sent = TRUE;
 
 	/* done with all mailboxes from this iter */
@@ -259,6 +261,10 @@
 	    sync->dest_msg_iter->save_results_left == 0 &&
 	    dsync_worker_output_flush(sync->dest_worker) > 0 &&
 	    dsync_worker_output_flush(sync->src_worker) > 0) {
+		dsync_worker_set_output_callback(sync->src_msg_iter->worker,
+						 NULL, NULL);
+		dsync_worker_set_output_callback(sync->dest_msg_iter->worker,
+						 NULL, NULL);
 		sync->brain->state++;
 		dsync_brain_sync(sync->brain);
 	}


More information about the dovecot-cvs mailing list