]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
When creating a new transaction log, don't reuse an existing one if its
authorTimo Sirainen <tss@iki.fi>
Sun, 25 May 2008 01:18:42 +0000 (04:18 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 25 May 2008 01:18:42 +0000 (04:18 +0300)
sequence isn't 1.

--HG--
branch : HEAD

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

index cb1f2dfc9a7ee9c684b1c32d9ab4ef0960dd2c2a..1dfbb4efadb145204d729a325ac9b6659da992c7 100644 (file)
@@ -477,6 +477,8 @@ mail_transaction_log_file_create2(struct mail_transaction_log_file *file,
                        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);