# HG changeset patch # User Timo Sirainen # Date 1033884612 -10800 # Node ID 9b36fc3c13856dcc185e69243e601463fb53483f # Parent 0da2b09461aaa82bc6be3ed09e469d407619f6c9 lockfix diff -r 0da2b09461aa -r 9b36fc3c1385 src/lib-index/mbox/mbox-lock.c --- a/src/lib-index/mbox/mbox-lock.c Sun Oct 06 09:08:26 2002 +0300 +++ b/src/lib-index/mbox/mbox-lock.c Sun Oct 06 09:10:12 2002 +0300 @@ -158,7 +158,7 @@ int mbox_lock_write(MailIndex *index) { - i_assert(index->mbox_lock_type != F_RDLCK); + i_assert(index->mbox_locks == 0 || index->mbox_lock_type != F_RDLCK); return mbox_lock(index, TRUE); } @@ -172,7 +172,6 @@ if (--index->mbox_locks > 0) return TRUE; - index->mbox_lock_type = F_UNLCK; failed = FALSE; #ifdef USE_FLOCK if (!mbox_lock_flock(index, F_UNLCK))