diff src/lib-storage/index/maildir/maildir-sync.c @ 7291:db65d921b0e1 HEAD

Check and update sync_last_check in one common function.
author Timo Sirainen <tss@iki.fi>
date Mon, 25 Feb 2008 21:38:58 +0200
parents e6693a0ec8e1
children 118ae423dbc4
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-sync.c	Mon Feb 25 21:37:45 2008 +0200
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Mon Feb 25 21:38:58 2008 +0200
@@ -871,11 +871,7 @@
 	if (!box->opened)
 		index_storage_mailbox_open(&mbox->ibox);
 
-	if ((flags & MAILBOX_SYNC_FLAG_FAST) == 0 ||
-	    mbox->ibox.sync_last_check + MAILBOX_FULL_SYNC_INTERVAL <=
-	    ioloop_time) {
-		mbox->ibox.sync_last_check = ioloop_time;
-
+	if (index_mailbox_want_full_sync(&mbox->ibox, flags)) {
 		T_BEGIN {
 			ctx = maildir_sync_context_new(mbox, flags);
 			ret = maildir_sync_context(ctx, FALSE, NULL,