dovecot: Don't assert-crash if looking up a non-parsed header af...

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 22 11:58:54 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/4d33a6959d32
changeset: 6445:4d33a6959d32
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 22 11:58:51 2007 +0300
description:
Don't assert-crash if looking up a non-parsed header after headers were
already parsed once.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/index/index-mail-headers.c |    4 +++-

diffs (14 lines):

diff -r 2b434cf6954e -r 4d33a6959d32 src/lib-storage/index/index-mail-headers.c
--- 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 @@ index_mail_get_raw_headers(struct index_
 				      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(


More information about the dovecot-cvs mailing list