[dovecot-cvs] dovecot/src/lib-index mail-index-lock.c, 1.54.2.1, 1.54.2.2 mail-index.c, 1.230.2.10, 1.230.2.11
tss at dovecot.org
tss at dovecot.org
Sun Dec 31 16:09:43 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv9446
Modified Files:
Tag: branch_1_0
mail-index-lock.c mail-index.c
Log Message:
Minor locking fix/cleanups.
Index: mail-index-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.54.2.1
retrieving revision 1.54.2.2
diff -u -d -r1.54.2.1 -r1.54.2.2
--- mail-index-lock.c 24 Oct 2006 16:10:25 -0000 1.54.2.1
+++ mail-index-lock.c 31 Dec 2006 16:09:40 -0000 1.54.2.2
@@ -295,7 +295,6 @@
index->lock_type = F_WRLCK;
if (mail_index_reopen(index, fd) < 0) {
- i_assert(index->excl_lock_count == 1);
(void)close(fd);
if (unlink(index->copy_lock_path) < 0) {
mail_index_file_set_syscall_error(index,
@@ -306,7 +305,6 @@
index->copy_lock_path = NULL;
index->lock_type = old_lock_type;
- index->excl_lock_count = 0;
return -1;
}
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.230.2.10
retrieving revision 1.230.2.11
diff -u -d -r1.230.2.10 -r1.230.2.11
--- mail-index.c 28 Dec 2006 16:27:41 -0000 1.230.2.10
+++ mail-index.c 31 Dec 2006 16:09:40 -0000 1.230.2.11
@@ -1632,7 +1632,7 @@
int ret, old_fd, old_lock_type;
i_assert(!MAIL_INDEX_IS_IN_MEMORY(index));
- i_assert(index->copy_lock_path == NULL || index->excl_lock_count == 0);
+ i_assert(index->excl_lock_count == 0);
old_map = index->map;
old_fd = index->fd;
@@ -1653,7 +1653,6 @@
index->fd = fd;
ret = 0;
} else {
- i_assert(index->excl_lock_count == 0);
ret = mail_index_try_open_only(index);
if (ret > 0)
ret = mail_index_lock_shared(index, FALSE, &lock_id);
More information about the dovecot-cvs
mailing list