Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7842:6480642aba24 HEAD
Make sure initial_modseq is correct when rotating transaction log.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 17 Jun 2008 04:51:40 +0300 |
parents | 38cb76c22dc5 |
children | 0df78677ea1b |
files | src/lib-index/mail-transaction-log-file.c |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-file.c Tue Jun 17 04:51:23 2008 +0300 +++ b/src/lib-index/mail-transaction-log-file.c Tue Jun 17 04:51:40 2008 +0300 @@ -185,9 +185,15 @@ hdr->file_seq = 1; } - if (log->head != NULL && hdr->file_seq <= log->head->hdr.file_seq) { - /* make sure the sequence grows */ - hdr->file_seq = log->head->hdr.file_seq+1; + if (log->head != NULL) { + if (hdr->file_seq <= log->head->hdr.file_seq) { + /* make sure the sequence grows */ + hdr->file_seq = log->head->hdr.file_seq+1; + } + if (hdr->initial_modseq < log->head->sync_highest_modseq) { + /* this should be always up-to-date */ + hdr->initial_modseq = log->head->sync_highest_modseq; + } } return 0; }