Mercurial > dovecot > core-2.2
changeset 1007:1222ab408f63 HEAD
FETCH ENVELOPE failed if it wasn't already cached.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 21 Jan 2003 21:56:33 +0200 |
parents | 95d77998ec16 |
children | b5ca53885d07 |
files | src/lib-storage/index/index-mail.c src/lib-storage/index/index-mail.h |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c Tue Jan 21 20:59:19 2003 +0200 +++ b/src/lib-storage/index/index-mail.c Tue Jan 21 21:56:33 2003 +0200 @@ -2,6 +2,7 @@ #include "lib.h" #include "istream.h" +#include "str.h" #include "message-address.h" #include "message-date.h" #include "message-part-serialize.h" @@ -202,6 +203,15 @@ if (data->save_envelope) { imap_envelope_parse_header(mail->pool, &data->envelope_data, name, name_len, value, value_len); + + if (name_len == 0) { + /* finalize the envelope */ + string_t *str; + + str = str_new(mail->pool, 256); + imap_envelope_write_part_data(data->envelope_data, str); + data->envelope = str_c(str); + } } if (name_len == 4 && data->save_sent_time &&
--- a/src/lib-storage/index/index-mail.h Tue Jan 21 20:59:19 2003 +0200 +++ b/src/lib-storage/index/index-mail.h Tue Jan 21 21:56:33 2003 +0200 @@ -18,7 +18,7 @@ struct cached_header *headers; struct message_part *parts; - char *envelope, *body, *bodystructure; + const char *envelope, *body, *bodystructure; struct message_part_envelope_data *envelope_data; struct mail_index_record *rec;