changeset 2212:f71c36aae566 HEAD

Exclusive index locking always used copy-locking without even trying fcntl-locking.
author Timo Sirainen <tss@iki.fi>
date Sun, 20 Jun 2004 16:14:17 +0300
parents 14badbddd7b7
children a3cd4bebb4aa
files src/lib-index/mail-index-lock.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-lock.c	Sun Jun 20 16:03:02 2004 +0300
+++ b/src/lib-index/mail-index-lock.c	Sun Jun 20 16:14:17 2004 +0300
@@ -254,8 +254,8 @@
 
 	/* if header size is smaller than what we have, we'll have to recreate
 	   the index to grow it. so don't even try regular locking. */
-	if (index->map->hdr == &index->map->hdr_copy &&
-	    index->map->hdr->base_header_size < sizeof(*index->hdr)) {
+	if (index->map->hdr != &index->map->hdr_copy &&
+	    index->map->hdr->base_header_size == sizeof(*index->hdr)) {
 		/* wait two seconds for exclusive lock */
 		ret = mail_index_lock(index, F_WRLCK, 2, TRUE, lock_id_r);
 		if (ret > 0)