[dovecot-cvs] dovecot/src/lib-index mail-index-view-sync.c, 1.57, 1.58

tss at dovecot.org tss at dovecot.org
Sun Dec 31 16:09:03 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv9347

Modified Files:
	mail-index-view-sync.c 
Log Message:
If we didn't sync everything in the view, we could have synced some 
transactions multiple times causing different kinds of problems.


Index: mail-index-view-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view-sync.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- mail-index-view-sync.c	15 Oct 2006 17:56:09 -0000	1.57
+++ mail-index-view-sync.c	31 Dec 2006 16:09:00 -0000	1.58
@@ -369,6 +369,15 @@
 		if (view_sync_pos_find(&view->syncs_done, seq, offset))
 			continue;
 
+		if (ctx->skipped_some) {
+			/* We've been skipping some transactions, which means
+			   we'll go through these same transactions again
+			   later. Since we're syncing this one, we don't want
+			   to do it again. */
+			mail_index_view_add_synced_transaction(view, seq,
+							       offset);
+		}
+
 		/* Apply transaction to view's mapping if needed (meaning we
 		   didn't just re-map the view to head mapping). */
 		if (ctx->sync_map_update) {
@@ -392,13 +401,6 @@
 			continue;
 		break;
 	}
-
-	if (ctx->skipped_some) {
-		/* We've been skipping some transactions, which means we'll
-		   go through these same transaction again later. Since we're
-		   syncing this one, we don't want to do it again. */
-		mail_index_view_add_synced_transaction(view, seq, offset);
-	}
 	return 1;
 }
 



More information about the dovecot-cvs mailing list