Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3500:98cf57713f0a HEAD
added extra assert for checking deadlocks
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 22 Jul 2005 13:22:18 +0300 |
parents | 35be29ba348d |
children | 51ffafcee2b8 |
files | src/lib-storage/index/mbox/mbox-lock.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-lock.c Fri Jul 22 13:14:58 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-lock.c Fri Jul 22 13:22:18 2005 +0300 @@ -1,6 +1,7 @@ /* Copyright (C) 2002 Timo Sirainen */ #include "lib.h" +#include "mail-index-private.h" #include "mbox-storage.h" #include "mbox-file.h" #include "mbox-lock.h" @@ -517,6 +518,9 @@ i_assert(lock_type == F_RDLCK || lock_type == F_WRLCK); i_assert(lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK); + /* mbox must be locked before index */ + i_assert(mbox->ibox.index->lock_type != F_WRLCK); + if (mbox->mbox_lock_type == F_UNLCK) { ret = mbox_update_locking(mbox, lock_type); if (ret <= 0)