dovecot-1.0: Ignore tail offset header updates that v1.1 writes.

dovecot at dovecot.org dovecot at dovecot.org
Fri Nov 16 19:56:14 EET 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/68e09f7bb619
changeset: 5456:68e09f7bb619
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Nov 16 19:56:10 2007 +0200
description:
Ignore tail offset header updates that v1.1 writes.

diffstat:

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

diffs (22 lines):

diff -r 3db8af10130a -r 68e09f7bb619 src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c	Mon Nov 12 20:13:55 2007 +0200
+++ b/src/lib-index/mail-index-sync-update.c	Fri Nov 16 19:56:10 2007 +0200
@@ -458,6 +458,7 @@ static int sync_header_update(const stru
 			      struct mail_index_sync_map_ctx *ctx)
 {
 	struct mail_index_map *map = ctx->view->map;
+	uint32_t orig_log_file_int_offset = map->hdr.log_file_int_offset;
 
 	if (u->offset >= map->hdr.base_header_size ||
 	    u->offset + u->size > map->hdr.base_header_size) {
@@ -478,6 +479,10 @@ static int sync_header_update(const stru
 		memcpy(PTR_OFFSET(&map->hdr, u->offset),
 		       u + 1, sizeof(map->hdr) - u->offset);
 	}
+
+	/* v1.1 writes tail offset updates for its internal purposes. they
+	   need to be ignored. */
+	map->hdr.log_file_int_offset = orig_log_file_int_offset;
 	return 1;
 }
 


More information about the dovecot-cvs mailing list