changeset 2938:bc8ff03715b2 HEAD

mmap_disable=yes: if mail_index_map() is called while syncing make sure we don't read past what is already synced into index.
author Timo Sirainen <tss@iki.fi>
date Sun, 05 Dec 2004 03:49:20 +0200
parents 43deb226d769
children 00b78082cd50
files src/lib-index/mail-index.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index.c	Sun Dec 05 03:47:03 2004 +0200
+++ b/src/lib-index/mail-index.c	Sun Dec 05 03:49:20 2004 +0200
@@ -655,6 +655,12 @@
 	unsigned int i;
 	int ret, retry;
 
+	if (index->log_locked) {
+		/* we're most likely syncing the index and we really don't
+		   want to read more than what was synced last time. */
+		sync_to_index = TRUE;
+	}
+
 	if ((*map)->hdr.indexid != 0) {
 		/* sync this as a view from transaction log. */
 		index->sync_update = TRUE;