[dovecot-cvs] dovecot/src/lib-index mail-index-lock.c,1.15,1.16

cras at procontrol.fi cras at procontrol.fi
Mon May 24 04:01:44 EEST 2004


Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv13198

Modified Files:
	mail-index-lock.c 
Log Message:
fix for last change



Index: mail-index-lock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- a/mail-index-lock.c	23 May 2004 23:52:15 -0000	1.15
+++ b/mail-index-lock.c	24 May 2004 01:01:42 -0000	1.16
@@ -346,7 +346,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->hdr->header_size >= sizeof(*index->hdr)) {
+	if (index->map->hdr == &index->map->hdr_copy &&
+	    index->map->hdr->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)



More information about the dovecot-cvs mailing list