Mercurial > dovecot > core-2.2
changeset 19302:3b1e7941542f
lib-storage: Support latest cache fields in struct mailbox_metadata.precache_fields
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 13 Oct 2015 21:57:29 +0300 |
parents | 5e48c5a29ddd |
children | a5e47d9637c3 |
files | src/lib-storage/index/index-mail.c src/lib-storage/index/index-status.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c Tue Oct 13 21:40:33 2015 +0300 +++ b/src/lib-storage/index/index-mail.c Tue Oct 13 21:57:29 2015 +0300 @@ -61,6 +61,9 @@ .type = MAIL_CACHE_FIELD_VARIABLE_SIZE }, { .name = "body.snippet", .type = MAIL_CACHE_FIELD_VARIABLE_SIZE } + /* FIXME: for now need to update get_metadata_precache_fields() in + index-status.c when adding more fields. those fields should probably + just be moved here to the same struct. */ }; static int index_mail_parse_body(struct index_mail *mail,
--- a/src/lib-storage/index/index-status.c Tue Oct 13 21:40:33 2015 +0300 +++ b/src/lib-storage/index/index-status.c Tue Oct 13 21:57:29 2015 +0300 @@ -237,8 +237,10 @@ strcmp(name, "imap.envelope") == 0) cache |= MAIL_FETCH_STREAM_HEADER; else if (strcmp(name, "mime.parts") == 0 || + strcmp(name, "binary.parts") == 0 || strcmp(name, "imap.body") == 0 || - strcmp(name, "imap.bodystructure") == 0) + strcmp(name, "imap.bodystructure") == 0 || + strcmp(name, "body.snippet") == 0) cache |= MAIL_FETCH_STREAM_BODY; else if (strcmp(name, "date.received") == 0) cache |= MAIL_FETCH_RECEIVED_DATE; @@ -250,6 +252,8 @@ cache |= MAIL_FETCH_PHYSICAL_SIZE; else if (strcmp(name, "pop3.uidl") == 0) cache |= MAIL_FETCH_UIDL_BACKEND; + else if (strcmp(name, "pop3.order") == 0) + cache |= MAIL_FETCH_POP3_ORDER; else if (strcmp(name, "guid") == 0) cache |= MAIL_FETCH_GUID; else if (strcmp(name, "flags") == 0) {