From cc96c96e288721c333f0f9ab258b9202bdd1a764 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 17 Jun 2008 12:36:25 +0300 Subject: [PATCH] Rotated transaction logs weren't always unlocked, potentially causing other processes to fail with timeout errors. --HG-- branch : HEAD --- src/lib-index/mail-transaction-log.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- 2.47.3