dovecot-1.2: Make mailbox_header_lookup_ctx's list of headers av...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 25 22:51:44 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/13418c67c683
changeset: 8336:13418c67c683
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 25 22:50:43 2008 +0300
description:
Make mailbox_header_lookup_ctx's list of headers available.

diffstat:

2 files changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/index/index-mail-headers.c |    3 ++-
src/lib-storage/mail-storage-private.h     |    1 +

diffs (30 lines):

diff -r 3f6fa7862843 -r 13418c67c683 src/lib-storage/index/index-mail-headers.c
--- a/src/lib-storage/index/index-mail-headers.c	Sat Oct 25 20:25:27 2008 +0300
+++ b/src/lib-storage/index/index-mail-headers.c	Sat Oct 25 22:50:43 2008 +0300
@@ -808,13 +808,14 @@ index_header_lookup_init_real(struct mai
 	ctx->count = count;
 
 	ctx->idx = p_new(pool, unsigned int, count);
-	ctx->name = p_new(pool, const char *, count);
+	ctx->name = p_new(pool, const char *, count + 1);
 
 	/* @UNSAFE */
 	for (i = 0; i < count; i++) {
 		ctx->idx[i] = fields[i].idx;
 		ctx->name[i] = p_strdup(pool, headers[i]);
 	}
+	ctx->ctx.headers = ctx->name;
 	return &ctx->ctx;
 }
 
diff -r 3f6fa7862843 -r 13418c67c683 src/lib-storage/mail-storage-private.h
--- a/src/lib-storage/mail-storage-private.h	Sat Oct 25 20:25:27 2008 +0300
+++ b/src/lib-storage/mail-storage-private.h	Sat Oct 25 22:50:43 2008 +0300
@@ -332,6 +332,7 @@ struct mailbox_sync_context {
 
 struct mailbox_header_lookup_ctx {
 	struct mailbox *box;
+	const char *const *headers;
 };
 
 /* Modules should use do "my_id = mail_storage_module_id++" and


More information about the dovecot-cvs mailing list