Mercurial > dovecot > core-2.2
changeset 20720:866d29e08e70
lib-index: Make sure new dovecot.index.log files start tracking modseqs.
This will make mail_index_modseq_get_next_log_offset() work correctly even
if modseqs haven't been explicitly enabled.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 08 Sep 2016 23:54:22 +0300 |
parents | 8f07aa7647d1 |
children | 6e339cbdeaf5 |
files | src/lib-index/mail-transaction-log-file.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-file.c Tue Aug 23 22:36:08 2016 +0300 +++ b/src/lib-index/mail-transaction-log-file.c Thu Sep 08 23:54:22 2016 +0300 @@ -251,6 +251,12 @@ } 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