changeset 7129:0c1859ca8ee9 HEAD

Don't crash with 0 byte mails when saving/copying them and trying to add e.g. bodystructure to cache.
author Timo Sirainen <tss@iki.fi>
date Sun, 06 Jan 2008 11:24:04 +0200
parents 98788fdcc3a6
children 26dbad6c08f3
files src/lib-storage/index/index-mail.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c	Sun Jan 06 11:04:07 2008 +0200
+++ b/src/lib-storage/index/index-mail.c	Sun Jan 06 11:24:04 2008 +0200
@@ -1270,6 +1270,9 @@
 {
 	struct index_mail *mail = (struct index_mail *)_mail;
 
+	/* This is needed with 0 byte mails to get hdr=NULL call done. */
+	index_mail_cache_parse_continue(_mail);
+
 	if (mail->data.received_date == (time_t)-1)
 		mail->data.received_date = received_date;
 	if (mail->data.save_date == (time_t)-1) {