changeset 83:a437489953da HEAD

last_lookup wasn't reset after mmap(). still feels somewhat buggy though..
author Timo Sirainen <tss@iki.fi>
date Thu, 29 Aug 2002 00:18:21 +0300
parents 438d5f258b01
children 954aadb2b2c2
files src/lib-index/mail-index.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index.c	Wed Aug 28 23:59:40 2002 +0300
+++ b/src/lib-index/mail-index.c	Thu Aug 29 00:18:21 2002 +0300
@@ -56,6 +56,9 @@
 		(void)ftruncate(index->fd, (off_t)index->mmap_length);
 	}
 
+	index->last_lookup_seq = 0;
+	index->last_lookup = NULL;
+
 	index->header = (MailIndexHeader *) index->mmap_base;
 	index->dirty_mmap = FALSE;
 	return TRUE;
@@ -282,6 +285,7 @@
 
 	if (lock_type == MAIL_LOCK_UNLOCK) {
 		/* reset last_lookup so rebuilds don't try to use it */
+		index->last_lookup_seq = 0;
 		index->last_lookup = NULL;
 	}
 
@@ -352,6 +356,7 @@
 
 	if (lock_type == MAIL_LOCK_UNLOCK) {
 		/* reset header so it's not used while being unlocked */
+		index->last_lookup_seq = 0;
 		index->last_lookup = NULL;
 	}