[dovecot-cvs] dovecot/src/lib-index mail-index-lock.c,1.30,1.31

cras at dovecot.org cras at dovecot.org
Fri Sep 3 23:59:28 EEST 2004


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

Modified Files:
	mail-index-lock.c 
Log Message:
cleanup/new assert



Index: mail-index-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- mail-index-lock.c	3 Sep 2004 20:53:18 -0000	1.30
+++ mail-index-lock.c	3 Sep 2004 20:59:26 -0000	1.31
@@ -87,9 +87,8 @@
 		ret = 0;
 	}
 
-	if (ret > 0) {
+	if (ret > 0)
 		return 1;
-	}
 
 	if (index->fcntl_locks_disable) {
 		/* FIXME: exclusive locking will rewrite the index file every
@@ -328,6 +327,7 @@
 							  index->copy_lock_path,
 							  "file_try_lock()");
 		}
+		i_assert(index->lock_type == F_WRLCK);
 		index->lock_type = F_RDLCK;
                 (void)mail_index_lock_mprotect(index, F_RDLCK);
 	}



More information about the dovecot-cvs mailing list