[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.94, 1.95 mbox-sync-parse.c, 1.23, 1.24 mbox-sync.c, 1.77, 1.78

cras at dovecot.org cras at dovecot.org
Sun Sep 5 20:53:48 EEST 2004


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

Modified Files:
	mbox-storage.c mbox-sync-parse.c mbox-sync.c 
Log Message:
Save extra record/header infos into index file permanently.



Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- mbox-storage.c	3 Sep 2004 20:06:46 -0000	1.94
+++ mbox-storage.c	5 Sep 2004 17:53:46 -0000	1.95
@@ -403,7 +403,7 @@
 
 	index = index_storage_alloc(index_dir, path, MBOX_INDEX_PREFIX);
 	mbox_extra_idx = mail_index_register_record_extra(index, "mbox",
-							  sizeof(uint64_t));
+							  0, sizeof(uint64_t));
 	ibox = index_storage_mailbox_init(storage, &mbox_mailbox,
 					  index, name, flags);
 	if (ibox == NULL)

Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mbox-sync-parse.c	28 Aug 2004 17:41:52 -0000	1.23
+++ mbox-sync-parse.c	5 Sep 2004 17:53:46 -0000	1.24
@@ -515,7 +515,7 @@
 	if (ibox->md5hdr_extra_idx == 0) {
 		ibox->md5hdr_extra_idx =
 			mail_index_register_record_extra(ibox->index,
-							 "header-md5", 16);
+							 "header-md5", 0, 16);
 	}
 
 	if (mail_index_lookup_extra(view, seq, ibox->md5hdr_extra_idx,

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- mbox-sync.c	3 Sep 2004 12:34:35 -0000	1.77
+++ mbox-sync.c	5 Sep 2004 17:53:46 -0000	1.78
@@ -338,7 +338,7 @@
 		return -1;
 	}
 
-	*offset_r = *((const uint64_t *)data);
+	*offset_r = data == NULL ? 0 : *((const uint64_t *)data);
 	return 0;
 }
 
@@ -764,7 +764,7 @@
 				sync_ctx->ibox->md5hdr_extra_idx =
 					mail_index_register_record_extra(
 						sync_ctx->ibox->index,
-						"header-md5", 16);
+						"header-md5", 0, 16);
 			}
 
 			if (mbox_sync_find_index_md5(sync_ctx,



More information about the dovecot-cvs mailing list