[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.4, 1.5 mbox-save.c, 1.63, 1.64 mbox-storage.c, 1.99, 1.100 mbox-sync-parse.c, 1.27, 1.28 mbox-sync.c, 1.92, 1.93

cras at dovecot.org cras at dovecot.org
Sun Sep 26 17:15:58 EEST 2004


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

Modified Files:
	mbox-file.c mbox-save.c mbox-storage.c mbox-sync-parse.c 
	mbox-sync.c 
Log Message:
Renamed "extra record info" and variations of it to "extension" or "ext" in
short.



Index: mbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-file.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mbox-file.c	28 Aug 2004 17:41:52 -0000	1.4
+++ mbox-file.c	26 Sep 2004 14:15:56 -0000	1.5
@@ -99,7 +99,7 @@
 
 	*deleted_r = FALSE;
 
-	ret = mail_index_lookup_extra(view, seq, ibox->mbox_extra_idx, &data);
+	ret = mail_index_lookup_ext(view, seq, ibox->mbox_ext_idx, &data);
 	if (ret <= 0) {
 		if (ret < 0)
 			mail_storage_set_index_error(ibox);

Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- mbox-save.c	28 Aug 2004 16:39:54 -0000	1.63
+++ mbox-save.c	26 Sep 2004 14:15:56 -0000	1.64
@@ -345,8 +345,8 @@
 
 		offset = ctx->output->offset == 0 ? 0 :
 			ctx->output->offset - 1;
-		mail_index_update_extra_rec(ctx->trans, ctx->seq,
-					    ibox->mbox_extra_idx, &offset);
+		mail_index_update_ext(ctx->trans, ctx->seq,
+				      ibox->mbox_ext_idx, &offset);
 		ctx->next_uid++;
 	}
 	mbox_save_append_flag_headers(ctx->headers,

Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- mbox-storage.c	24 Sep 2004 11:47:30 -0000	1.99
+++ mbox-storage.c	26 Sep 2004 14:15:56 -0000	1.100
@@ -386,7 +386,7 @@
 	struct index_mailbox *ibox;
 	struct mail_index *index;
 	const char *path, *index_dir;
-	uint32_t mbox_extra_idx;
+	uint32_t mbox_ext_idx;
 
 	if (strcmp(name, "INBOX") == 0) {
 		/* name = "INBOX"
@@ -403,8 +403,8 @@
 	}
 
 	index = index_storage_alloc(index_dir, path, MBOX_INDEX_PREFIX);
-	mbox_extra_idx = mail_index_register_record_extra(index, "mbox",
-							  0, sizeof(uint64_t));
+	mbox_ext_idx = mail_index_ext_register(index, "mbox",
+					       0, sizeof(uint64_t));
 	ibox = index_storage_mailbox_init(storage, &mbox_mailbox,
 					  index, name, flags);
 	if (ibox == NULL)
@@ -413,7 +413,7 @@
 	ibox->path = i_strdup(path);
 	ibox->mbox_fd = -1;
 	ibox->mbox_lock_type = F_UNLCK;
-	ibox->mbox_extra_idx = mbox_extra_idx;
+	ibox->mbox_ext_idx = mbox_ext_idx;
 
 	ibox->mail_deinit = mbox_mail_deinit;
 	ibox->is_recent = mbox_mail_is_recent;

Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- mbox-sync-parse.c	23 Sep 2004 10:41:38 -0000	1.27
+++ mbox-sync-parse.c	26 Sep 2004 14:15:56 -0000	1.28
@@ -513,14 +513,13 @@
 	}
 
 	/* match by MD5 sum */
-	if (ibox->md5hdr_extra_idx == 0) {
-		ibox->md5hdr_extra_idx =
-			mail_index_register_record_extra(ibox->index,
-							 "header-md5", 0, 16);
+	if (ibox->md5hdr_ext_idx == 0) {
+		ibox->md5hdr_ext_idx =
+			mail_index_ext_register(ibox->index, "header-md5",
+						0, 16);
 	}
 
-	if (mail_index_lookup_extra(view, seq, ibox->md5hdr_extra_idx,
-				    &data) < 0) {
+	if (mail_index_lookup_ext(view, seq, ibox->md5hdr_ext_idx, &data) < 0) {
 		mail_storage_set_index_error(ibox);
 		return -1;
 	}

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- mbox-sync.c	24 Sep 2004 12:25:20 -0000	1.92
+++ mbox-sync.c	26 Sep 2004 14:15:56 -0000	1.93
@@ -306,10 +306,10 @@
 			return -1;
 		}
 
-		if (mail_index_lookup_extra(sync_ctx->sync_view,
-					    sync_ctx->idx_seq,
-					    sync_ctx->ibox->md5hdr_extra_idx,
-					    &data) < 0) {
+		if (mail_index_lookup_ext(sync_ctx->sync_view,
+					  sync_ctx->idx_seq,
+					  sync_ctx->ibox->md5hdr_ext_idx,
+					  &data) < 0) {
 			mail_storage_set_index_error(sync_ctx->ibox);
 			return -1;
 		}
@@ -337,10 +337,10 @@
 
 	if (!nocheck) {
 		/* see if from_offset needs updating */
-		if (mail_index_lookup_extra(sync_ctx->sync_view,
-					    sync_ctx->idx_seq,
-					    sync_ctx->ibox->mbox_extra_idx,
-					    &data) < 0) {
+		if (mail_index_lookup_ext(sync_ctx->sync_view,
+					  sync_ctx->idx_seq,
+					  sync_ctx->ibox->mbox_ext_idx,
+					  &data) < 0) {
 			mail_storage_set_index_error(sync_ctx->ibox);
 			return -1;
 		}
@@ -351,8 +351,8 @@
 	}
 
 	offset = mail->from_offset;
-	mail_index_update_extra_rec(sync_ctx->t, sync_ctx->idx_seq,
-				    sync_ctx->ibox->mbox_extra_idx, &offset);
+	mail_index_update_ext(sync_ctx->t, sync_ctx->idx_seq,
+			      sync_ctx->ibox->mbox_ext_idx, &offset);
 	return 0;
 }
 
@@ -377,11 +377,10 @@
 					MODIFY_REPLACE, mbox_flags,
 					mail->keywords);
 
-		if (sync_ctx->ibox->md5hdr_extra_idx != 0) {
-			mail_index_update_extra_rec(sync_ctx->t,
-				sync_ctx->idx_seq,
-				sync_ctx->ibox->md5hdr_extra_idx,
-				mail_ctx->hdr_md5_sum);
+		if (sync_ctx->ibox->md5hdr_ext_idx != 0) {
+			mail_index_update_ext(sync_ctx->t, sync_ctx->idx_seq,
+					      sync_ctx->ibox->md5hdr_ext_idx,
+					      mail_ctx->hdr_md5_sum);
 		}
 
 		if (str_len(mail_ctx->uidl) > 0) {
@@ -503,11 +502,11 @@
 static void update_from_offsets(struct mbox_sync_context *sync_ctx)
 {
 	const struct mbox_sync_mail *mails;
-	uint32_t idx, extra_idx;
+	uint32_t idx, ext_idx;
 	uint64_t offset;
 	size_t size;
 
-	extra_idx = sync_ctx->ibox->mbox_extra_idx;
+	ext_idx = sync_ctx->ibox->mbox_ext_idx;
 
 	mails = buffer_get_modifyable_data(sync_ctx->mails, &size);
 	size /= sizeof(*mails);
@@ -518,8 +517,8 @@
 			continue;
 
 		offset = mails[idx].from_offset;
-		mail_index_update_extra_rec(sync_ctx->t, mails[idx].idx_seq,
-					    extra_idx, &offset);
+		mail_index_update_ext(sync_ctx->t, mails[idx].idx_seq,
+				      ext_idx, &offset);
 	}
 }
 
@@ -812,9 +811,9 @@
 			/* 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_extra_idx == 0) {
-				sync_ctx->ibox->md5hdr_extra_idx =
-					mail_index_register_record_extra(
+			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);
 			}



More information about the dovecot-cvs mailing list