dovecot-1.2: Rotated transaction logs weren't always unlocked, p...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 17 12:36:49 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/1da72e385de4
changeset: 7878:1da72e385de4
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jun 17 12:36:25 2008 +0300
description:
Rotated transaction logs weren't always unlocked, potentially causing other
processes to fail with timeout errors.

diffstat:

1 file changed, 5 insertions(+)
src/lib-index/mail-transaction-log.c |    5 +++++

diffs (15 lines):

diff -r 2e75e5a42f0e -r 1da72e385de4 src/lib-index/mail-transaction-log.c
--- a/src/lib-index/mail-transaction-log.c	Tue Jun 17 12:36:15 2008 +0300
+++ b/src/lib-index/mail-transaction-log.c	Tue Jun 17 12:36:25 2008 +0300
@@ -207,6 +207,11 @@ void mail_transaction_logs_clean(struct 
 
 		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);
 }
 


More information about the dovecot-cvs mailing list