[dovecot-cvs] dovecot/src/lib-index mail-index-lock.c,1.21,1.22

cras at procontrol.fi cras at procontrol.fi
Sun Jun 20 16:14:19 EEST 2004


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

Modified Files:
	mail-index-lock.c 
Log Message:
Exclusive index locking always used copy-locking without even trying
fcntl-locking.



Index: mail-index-lock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mail-index-lock.c	14 Jun 2004 04:27:44 -0000	1.21
+++ mail-index-lock.c	20 Jun 2004 13:14:17 -0000	1.22
@@ -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)



More information about the dovecot-cvs mailing list