[dovecot-cvs] dovecot/src/lib-index mail-index-lock.c,1.52,1.53

cras at dovecot.org cras at dovecot.org
Sun Jan 22 15:19:45 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv27025/lib-index

Modified Files:
	mail-index-lock.c 
Log Message:
Don't break with INDEX=MEMORY and lock_method=dotlock



Index: mail-index-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- mail-index-lock.c	18 Jan 2006 23:03:43 -0000	1.52
+++ mail-index-lock.c	22 Jan 2006 13:19:42 -0000	1.53
@@ -167,7 +167,8 @@
 	if (ret > 0)
 		return 1;
 
-	if (index->lock_method == MAIL_INDEX_LOCK_DOTLOCK) {
+	if (index->lock_method == MAIL_INDEX_LOCK_DOTLOCK &&
+	    !MAIL_INDEX_IS_IN_MEMORY(index)) {
 		/* FIXME: exclusive locking will rewrite the index file every
 		   time. shouldn't really be needed.. reading doesn't require
 		   locks then, though */



More information about the dovecot-cvs mailing list