changeset 632:8efd9f63e333 HEAD

syncing doesn't do anything now if we know we're already synced
author Timo Sirainen <tss@iki.fi>
date Wed, 20 Nov 2002 20:28:15 +0200
parents 8abfbce2f72d
children 3814fc4f4135
files src/lib-index/mbox/mbox-sync.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-sync.c	Wed Nov 20 20:27:52 2002 +0200
+++ b/src/lib-index/mbox/mbox-sync.c	Wed Nov 20 20:28:15 2002 +0200
@@ -78,6 +78,11 @@
 	if (changes != NULL)
 		*changes = FALSE;
 
+	if (index->mbox_sync_counter == index->mbox_lock_counter) {
+		/* we've already synced in this locking session */
+		return TRUE;
+	}
+
 	if (index->fd == -1) {
 		/* anon-mmaped */
 		index_mtime = index->file_sync_stamp;