[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.72, 1.73

cras at dovecot.org cras at dovecot.org
Sun Aug 29 10:39:51 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv23164/lib-storage/index/mbox

Modified Files:
	mbox-sync.c 
Log Message:
Disabling mbox_dirty_syncs didn't always work. And it was a bit broken.



Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- mbox-sync.c	28 Aug 2004 17:41:52 -0000	1.72
+++ mbox-sync.c	29 Aug 2004 07:39:49 -0000	1.73
@@ -704,7 +704,7 @@
 
 	messages_count = mail_index_view_get_message_count(sync_ctx->sync_view);
 
-	if (min_message_count != 0) {
+	if (!mail_index_sync_have_more(sync_ctx->index_sync_ctx)) {
 		ret = mbox_sync_seek_to_seq(sync_ctx, partial ?
 					    messages_count : 0);
 	} else {
@@ -1131,6 +1131,9 @@
 	unsigned int lock_id = 0;
 	int ret, changed;
 
+	if (!ibox->mbox_do_dirty_syncs)
+		flags |= MBOX_SYNC_UNDIRTY;
+
 	if ((flags & MBOX_SYNC_LOCK_READING) != 0) {
 		if (mbox_lock(ibox, F_RDLCK, &lock_id) <= 0)
 			return -1;
@@ -1330,10 +1333,6 @@
 	    ibox->sync_last_check + MAILBOX_FULL_SYNC_INTERVAL <= ioloop_time) {
 		ibox->sync_last_check = ioloop_time;
 
-		if ((flags & MAILBOX_SYNC_FLAG_FULL) != 0 ||
-		    !ibox->mbox_do_dirty_syncs)
-			mbox_sync_flags |= MBOX_SYNC_UNDIRTY;
-
 		ret = mbox_sync(ibox, mbox_sync_flags);
 	}
 



More information about the dovecot-cvs mailing list