From: Timo Sirainen Date: Tue, 17 Jun 2008 09:36:25 +0000 (+0300) Subject: Rotated transaction logs weren't always unlocked, potentially causing other X-Git-Tag: 1.2.alpha1~283 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc96c96e288721c333f0f9ab258b9202bdd1a764;p=thirdparty%2Fdovecot%2Fcore.git Rotated transaction logs weren't always unlocked, potentially causing other processes to fail with timeout errors. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-transaction-log.c b/src/lib-index/mail-transaction-log.c index 0e8800faac..2032d0124f 100644 --- a/src/lib-index/mail-transaction-log.c +++ b/src/lib-index/mail-transaction-log.c @@ -207,6 +207,11 @@ void mail_transaction_logs_clean(struct mail_transaction_log *log) mail_transaction_log_file_free(&file); } + /* if we still have locked files with refcount=0, unlock them */ + for (; file != NULL; file = file->next) { + if (file->locked && file->refcount == 0) + mail_transaction_log_file_unlock(file); + } i_assert(log->head == NULL || log->files != NULL); }