dovecot-2.1: sdbox: Altmove flag changes weren't immediately mar...

dovecot at dovecot.org dovecot at dovecot.org
Tue Feb 21 15:23:32 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/d9a6b0991f2e
changeset: 14181:d9a6b0991f2e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Feb 21 15:21:19 2012 +0200
description:
sdbox: Altmove flag changes weren't immediately marked as synced.
This caused the altmoves to be retried.

diffstat:

 src/lib-storage/index/dbox-single/sdbox-sync.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 242ad2a73648 -r d9a6b0991f2e src/lib-storage/index/dbox-single/sdbox-sync.c
--- a/src/lib-storage/index/dbox-single/sdbox-sync.c	Tue Feb 21 11:35:21 2012 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-sync.c	Tue Feb 21 15:21:19 2012 +0200
@@ -36,6 +36,7 @@
 			    enum sdbox_sync_entry_type type)
 {
 	struct dbox_file *file;
+	enum modify_type modify_type;
 
 	switch (type) {
 	case SDBOX_SYNC_ENTRY_TYPE_EXPUNGE:
@@ -46,6 +47,13 @@
 		break;
 	case SDBOX_SYNC_ENTRY_TYPE_MOVE_FROM_ALT:
 	case SDBOX_SYNC_ENTRY_TYPE_MOVE_TO_ALT:
+		/* update flags in the sync transaction, mainly to make
+		   sure that these alt changes get marked as synced
+		   and won't be retried */
+		modify_type = type == SDBOX_SYNC_ENTRY_TYPE_MOVE_TO_ALT ?
+			MODIFY_ADD : MODIFY_REMOVE;
+		mail_index_update_flags(ctx->trans, seq, modify_type,
+					DBOX_INDEX_FLAG_ALT);
 		file = sdbox_file_init(ctx->mbox, uid);
 		dbox_sync_file_move_if_needed(file, type);
 		dbox_file_unref(&file);


More information about the dovecot-cvs mailing list