changeset 6445:4d33a6959d32 HEAD

Don't assert-crash if looking up a non-parsed header after headers were already parsed once.
author Timo Sirainen <tss@iki.fi>
date Sat, 22 Sep 2007 11:58:51 +0300
parents 2b434cf6954e
children 0a44101371a4
files src/lib-storage/index/index-mail-headers.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail-headers.c	Sat Sep 22 11:50:51 2007 +0300
+++ b/src/lib-storage/index/index-mail-headers.c	Sat Sep 22 11:58:51 2007 +0300
@@ -574,7 +574,9 @@
 				      mail->data.seq, &field_idx, 1) <= 0) {
 		/* not in cache / error - first see if it's already parsed */
 		p_free(mail->data_pool, dest);
-		if (mail->header_seq != mail->data.seq) {
+
+		if (mail->header_seq != mail->data.seq ||
+		    index_mail_header_is_parsed(mail, field_idx) < 0) {
 			/* parse */
 			headers[0] = field; headers[1] = NULL;
 			headers_ctx = mailbox_header_lookup_init(