dovecot: Previous tail_offset change broke when rotating transac...

dovecot at dovecot.org dovecot at dovecot.org
Tue Dec 4 14:32:25 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/9a11ee1c7912
changeset: 6927:9a11ee1c7912
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 04 14:31:55 2007 +0200
description:
Previous tail_offset change broke when rotating transaction logs.

diffstat:

1 file changed, 5 insertions(+), 1 deletion(-)
src/lib-index/mail-index-sync-update.c |    6 +++++-

diffs (23 lines):

diff -r f90a4e265d00 -r 9a11ee1c7912 src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c	Tue Dec 04 14:22:18 2007 +0200
+++ b/src/lib-index/mail-index-sync-update.c	Tue Dec 04 14:31:55 2007 +0200
@@ -39,7 +39,10 @@ mail_index_sync_update_log_offset(struct
 		}
 	} else {
 		i_assert(ctx->view->index->log->head->hdr.file_seq == prev_seq);
-		map->hdr.log_file_seq = prev_seq;
+		if (map->hdr.log_file_seq != prev_seq) {
+			map->hdr.log_file_seq = prev_seq;
+			map->hdr.log_file_tail_offset = 0;
+		}
 	}
 	map->hdr.log_file_head_offset = prev_offset;
 }
@@ -757,6 +760,7 @@ int mail_index_sync_map(struct mail_inde
 						       &prev_seq, &prev_offset);
 		map = mail_index_map_alloc(index);
 		map->hdr.log_file_seq = prev_seq;
+		map->hdr.log_file_tail_offset = 0;
 		mail_index_sync_replace_map(&sync_map_ctx, map);
 	}
 	map = NULL;


More information about the dovecot-cvs mailing list