dovecot-1.2: Make sure initial_modseq is correct when rotating t...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 17 04:51:52 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/6480642aba24
changeset: 7842:6480642aba24
user: Timo Sirainen <tss at iki.fi>
date: Tue Jun 17 04:51:40 2008 +0300
description:
Make sure initial_modseq is correct when rotating transaction log.
diffstat:
1 file changed, 9 insertions(+), 3 deletions(-)
src/lib-index/mail-transaction-log-file.c | 12 +++++++++---
diffs (22 lines):
diff -r 38cb76c22dc5 -r 6480642aba24 src/lib-index/mail-transaction-log-file.c
--- 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 @@ mail_transaction_log_init_hdr(struct mai
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;
}
More information about the dovecot-cvs
mailing list