Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8336:13418c67c683 HEAD
Make mailbox_header_lookup_ctx's list of headers available.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 25 Oct 2008 22:50:43 +0300 |
parents | 3f6fa7862843 |
children | 210e2b09d9d4 |
files | src/lib-storage/index/index-mail-headers.c src/lib-storage/mail-storage-private.h |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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; }
--- 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_header_lookup_ctx { struct mailbox *box; + const char *const *headers; }; /* Modules should use do "my_id = mail_storage_module_id++" and