dovecot-1.1: When creating a new transaction log, don't reuse an...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 25 04:19:53 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/7940ff8ecd13
changeset: 7546:7940ff8ecd13
user:      Timo Sirainen <tss at iki.fi>
date:      Sun May 25 04:18:42 2008 +0300
description:
When creating a new transaction log, don't reuse an existing one if its
sequence isn't 1.

diffstat:

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

diffs (12 lines):

diff -r 2c3bb09045be -r 7940ff8ecd13 src/lib-index/mail-transaction-log-file.c
--- a/src/lib-index/mail-transaction-log-file.c	Sun May 25 04:17:39 2008 +0300
+++ b/src/lib-index/mail-transaction-log-file.c	Sun May 25 04:18:42 2008 +0300
@@ -477,6 +477,8 @@ mail_transaction_log_file_create2(struct
 			file->fd = fd;
 			if (mail_transaction_log_file_read_hdr(file,
 							       FALSE) > 0 &&
+			    file->hdr.file_seq == 1 &&
+			    file->hdr.prev_file_seq == 0 &&
 			    mail_transaction_log_file_stat(file, FALSE) == 0) {
 				/* yes, it was ok */
 				(void)file_dotlock_delete(dotlock);


More information about the dovecot-cvs mailing list