]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Make sure new dovecot.index.log files start tracking modseqs.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 8 Sep 2016 20:54:22 +0000 (23:54 +0300)
committerGitLab <gitlab@git.dovecot.net>
Fri, 9 Sep 2016 06:49:55 +0000 (09:49 +0300)
This will make mail_index_modseq_get_next_log_offset() work correctly even
if modseqs haven't been explicitly enabled.

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

index 2e24d7c97d8f4f7160ed9c5b9193cde6a7b48408..bf4ff94e6d037dab6f22c41eee31f63196710f00 100644 (file)
@@ -251,6 +251,12 @@ mail_transaction_log_init_hdr(struct mail_transaction_log *log,
        } else {
                hdr->file_seq = 1;
        }
+       if (hdr->initial_modseq == 0) {
+               /* modseq tracking in log files is required for many reasons
+                  nowadays, even if per-message modseqs aren't enabled in
+                  dovecot.index. */
+               hdr->initial_modseq = 1;
+       }
 
        if (log->head != NULL) {
                /* make sure the sequence always increases to avoid crashes