From: Timo Sirainen Date: Mon, 6 Oct 2003 23:23:37 +0000 (+0300) Subject: If there was multiple headers with same name, we stored only first one into X-Git-Tag: 1.1.alpha1~4295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fca6425332579ae0f4e07600af9d37bf5261e20b;p=thirdparty%2Fdovecot%2Fcore.git If there was multiple headers with same name, we stored only first one into cache. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-mail-headers.c b/src/lib-storage/index/index-mail-headers.c index 1952e8014e..b893e30b24 100644 --- a/src/lib-storage/index/index-mail-headers.c +++ b/src/lib-storage/index/index-mail-headers.c @@ -356,21 +356,17 @@ int index_mail_parse_header(struct message_part *part, hdr->value, hdr->value_len); if (!hdr->no_newline) str_append(data->header_data, "\n"); - if (!hdr->continues) { - cached_hdr->fully_saved = TRUE; - data->parsing_count--; - } } else { - /* it's already in header_data. */ + /* it's already in header_data. it means it's fully + cached and we don't have to worry about other than + the first header line. */ i_assert(cached_hdr->value_idx == 0); cached_hdr->value_idx = data->header_stream->v_offset; cached_hdr->fully_saved = TRUE; - data->parsing_count--; + if (--data->parsing_count == 0) + return FALSE; } - - if (data->parsing_count == 0) - return FALSE; } return TRUE; }