dovecot: Make sure tail offset gets updated when extension recor...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jan 11 05:27:54 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/5187649faa52
changeset: 7145:5187649faa52
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jan 11 05:27:46 2008 +0200
description:
Make sure tail offset gets updated when extension records are updated.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/lib-index/mail-index-sync.c |    7 +++++--

diffs (31 lines):

diff -r 0734af67ca99 -r 5187649faa52 src/lib-index/mail-index-sync.c
--- a/src/lib-index/mail-index-sync.c	Fri Jan 11 04:42:37 2008 +0200
+++ b/src/lib-index/mail-index-sync.c	Fri Jan 11 05:27:46 2008 +0200
@@ -503,6 +503,10 @@ static bool mail_index_sync_view_have_an
 			continue;
 
 		switch (hdr->type & MAIL_TRANSACTION_TYPE_MASK) {
+		case MAIL_TRANSACTION_EXT_REC_UPDATE:
+			/* extension record updates aren't exactly needed
+			   to be synced, but cache syncing relies on tail
+			   offsets being updated. */
 		case MAIL_TRANSACTION_EXPUNGE:
 		case MAIL_TRANSACTION_FLAG_UPDATE:
 		case MAIL_TRANSACTION_KEYWORD_UPDATE:
@@ -684,7 +688,6 @@ static void
 static void
 mail_index_sync_update_mailbox_offset(struct mail_index_sync_ctx *ctx)
 {
-	const struct mail_index_header *hdr = &ctx->index->map->hdr;
 	uint32_t seq;
 	uoff_t offset;
 
@@ -694,7 +697,7 @@ mail_index_sync_update_mailbox_offset(st
 
 	/* If tail offset has changed, make sure it gets written to
 	   transaction log. */
-	if (hdr->log_file_tail_offset != ctx->last_tail_offset)
+	if (ctx->last_tail_offset != offset)
 		ctx->ext_trans->log_updates = TRUE;
 }
 


More information about the dovecot-cvs mailing list