]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Rotated transaction logs weren't always unlocked, potentially causing other
authorTimo Sirainen <tss@iki.fi>
Tue, 17 Jun 2008 09:36:25 +0000 (12:36 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 17 Jun 2008 09:36:25 +0000 (12:36 +0300)
processes to fail with timeout errors.

--HG--
branch : HEAD

src/lib-index/mail-transaction-log.c

index 0e8800faaceb1443c1fa58902526748cb27ea033..2032d0124ffa5b50faa3e972b7d4ee6a5530f179 100644 (file)
@@ -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);
 }