changeset 123:8d07a46abfdd HEAD

If we notice hash corruption, we can't rebuild it because we're holding shared lock, not exclusive.. So, just fail and mark it to be rebuilt later.
author Timo Sirainen <tss@iki.fi>
date Tue, 03 Sep 2002 21:30:14 +0300
parents 9b87ee7cc19f
children 0d18820ea7af
files src/lib-index/mail-messageset.c
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-messageset.c	Mon Sep 02 23:23:32 2002 +0300
+++ b/src/lib-index/mail-messageset.c	Tue Sep 03 21:30:14 2002 +0300
@@ -211,13 +211,8 @@
 					"lookup returned offset outside range",
 					index->filepath);
 
-			if (!mail_hash_rebuild(index->hash))
-				return -1;
-
-			/* lets try again */
-			pos = mail_hash_lookup_uid(index->hash, uid);
-			if (pos + sizeof(MailIndexRecord) > index->mmap_length)
-				return -1;
+			index->set_flags |= MAIL_INDEX_FLAG_REBUILD_HASH;
+			return -1;
 		}
 
 		rec = (MailIndexRecord *) ((char *) index->mmap_base + pos);