[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.88, 1.89

cras at dovecot.org cras at dovecot.org
Fri Sep 24 14:18:53 EEST 2004


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

Modified Files:
	mbox-sync.c 
Log Message:
If only mbox timestamp changes, do a full sync.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- mbox-sync.c	23 Sep 2004 22:29:13 -0000	1.88
+++ mbox-sync.c	24 Sep 2004 11:18:50 -0000	1.89
@@ -1091,8 +1091,12 @@
 			/* file is fully synced */
 			sync_ctx->ibox->mbox_sync_dirty = FALSE;
 			min_msg_count = 0;
-		} else if ((flags & MBOX_SYNC_UNDIRTY) != 0) {
-			/* we want to do full syncing */
+		} else if ((flags & MBOX_SYNC_UNDIRTY) != 0 ||
+			   (uint64_t)st.st_size == sync_ctx->hdr->sync_size) {
+			/* we want to do full syncing. always do this if
+			   file size hasn't changed but timestamp has. it most
+			   likely means that someone had modified some header
+			   and we probably want to know about it */
 			min_msg_count = (uint32_t)-1;
 			sync_ctx->ibox->mbox_sync_dirty = TRUE;
 		} else {



More information about the dovecot-cvs mailing list