[dovecot-cvs] dovecot/src/lib-index mail-index.c,1.180,1.181

cras at dovecot.org cras at dovecot.org
Sun Dec 5 04:18:46 EET 2004


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv17201/lib-index

Modified Files:
	mail-index.c 
Log Message:
mmap_disable=yes: when we're syncing index by reading transaction log,
update map header's log file offsets so our checks that use them actually
work.



Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- mail-index.c	5 Dec 2004 01:49:20 -0000	1.180
+++ mail-index.c	5 Dec 2004 02:18:44 -0000	1.181
@@ -564,8 +564,8 @@
 	struct mail_index_header hdr;
 	const struct mail_transaction_header *thdr;
 	const void *tdata;
-	uint32_t max_seq;
-	uoff_t max_offset;
+	uint32_t prev_seq, max_seq;
+	uoff_t prev_offset, max_offset;
 	size_t pos;
 	int ret, skipped;
 
@@ -630,6 +630,12 @@
 		}
 	}
 
+	mail_transaction_log_view_get_prev_pos(log_view, &prev_seq,
+					       &prev_offset);
+        index->map->hdr.log_file_seq = prev_seq;
+	index->map->hdr.log_file_int_offset =
+		index->map->hdr.log_file_ext_offset = prev_offset;
+
 	mail_index_sync_map_deinit(&sync_map_ctx);
 	mail_index_view_close(view);
 	mail_transaction_log_view_close(log_view);



More information about the dovecot-cvs mailing list