[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c,1.1,1.2 index-mail.h,1.1,1.2
cras at procontrol.fi
cras at procontrol.fi
Tue Jan 21 21:56:35 EET 2003
Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv29433/lib-storage/index
Modified Files:
index-mail.c index-mail.h
Log Message:
FETCH ENVELOPE failed if it wasn't already cached.
Index: index-mail.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- index-mail.c 21 Jan 2003 05:36:32 -0000 1.1
+++ index-mail.c 21 Jan 2003 19:56:33 -0000 1.2
@@ -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 &&
Index: index-mail.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- index-mail.h 21 Jan 2003 05:36:32 -0000 1.1
+++ index-mail.h 21 Jan 2003 19:56:33 -0000 1.2
@@ -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;
More information about the dovecot-cvs
mailing list