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

cras at dovecot.org cras at dovecot.org
Sun Aug 29 10:54:58 EEST 2004


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

Modified Files:
	mbox-sync.c 
Log Message:
Save sync_last_check for any sync, not just in sync_init() so FAST flag
doesn't do another sync if one was just done in transaction commit.



Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- mbox-sync.c	29 Aug 2004 07:39:49 -0000	1.73
+++ mbox-sync.c	29 Aug 2004 07:54:55 -0000	1.74
@@ -1131,6 +1131,8 @@
 	unsigned int lock_id = 0;
 	int ret, changed;
 
+	ibox->sync_last_check = ioloop_time;
+
 	if (!ibox->mbox_do_dirty_syncs)
 		flags |= MBOX_SYNC_UNDIRTY;
 
@@ -1330,11 +1332,8 @@
 	int ret = 0;
 
 	if ((flags & MAILBOX_SYNC_FLAG_FAST) == 0 ||
-	    ibox->sync_last_check + MAILBOX_FULL_SYNC_INTERVAL <= ioloop_time) {
-		ibox->sync_last_check = ioloop_time;
-
+	    ibox->sync_last_check + MAILBOX_FULL_SYNC_INTERVAL <= ioloop_time)
 		ret = mbox_sync(ibox, mbox_sync_flags);
-	}
 
 	return index_mailbox_sync_init(box, flags, ret < 0);
 }



More information about the dovecot-cvs mailing list