[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.31, 1.32 mbox-sync.c, 1.127, 1.128

cras at dovecot.org cras at dovecot.org
Tue Dec 14 05:03:37 EET 2004


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv21825/mbox

Modified Files:
	mbox-sync-parse.c mbox-sync.c 
Log Message:
Always register the header-md5, but use separate variable to figure out if
it should actually be used.



Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- mbox-sync-parse.c	14 Dec 2004 02:44:33 -0000	1.31
+++ mbox-sync-parse.c	14 Dec 2004 03:03:35 -0000	1.32
@@ -442,11 +442,7 @@
 	}
 
 	/* match by MD5 sum */
-	if (ibox->md5hdr_ext_idx == 0) {
-		ibox->md5hdr_ext_idx =
-			mail_index_ext_register(ibox->index, "header-md5",
-						0, 16, 1);
-	}
+	ibox->mbox_save_md5 = TRUE;
 
 	if (mail_index_lookup_ext(view, seq, ibox->md5hdr_ext_idx, &data) < 0) {
 		mail_storage_set_index_error(ibox);

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- mbox-sync.c	13 Dec 2004 00:24:27 -0000	1.127
+++ mbox-sync.c	14 Dec 2004 03:03:35 -0000	1.128
@@ -349,7 +349,7 @@
 					MODIFY_REPLACE, mbox_flags,
 					mail->keywords);
 
-		if (sync_ctx->ibox->md5hdr_ext_idx != 0) {
+		if (sync_ctx->ibox->mbox_save_md5 != 0) {
 			mail_index_update_ext(sync_ctx->t, sync_ctx->idx_seq,
 					      sync_ctx->ibox->md5hdr_ext_idx,
 					      mail_ctx->hdr_md5_sum, NULL);
@@ -851,12 +851,7 @@
 			/* If we can't use/store X-UID header, use MD5 sum.
 			   Also check for existing MD5 sums when we're actually
 			   able to write X-UIDs. */
-			if (sync_ctx->ibox->md5hdr_ext_idx == 0) {
-				sync_ctx->ibox->md5hdr_ext_idx =
-					mail_index_ext_register(
-						sync_ctx->ibox->index,
-						"header-md5", 0, 16, 1);
-			}
+			sync_ctx->ibox->mbox_save_md5 = TRUE;
 
 			if (mbox_sync_find_index_md5(sync_ctx,
 						     mail_ctx->hdr_md5_sum,



More information about the dovecot-cvs mailing list