Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1811:caaeeda81d9d HEAD
If there was multiple headers with same name, we stored only first one into
cache.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 07 Oct 2003 02:23:37 +0300 |
parents | e3ce78c545f0 |
children | 95d03c5a3a31 |
files | src/lib-storage/index/index-mail-headers.c |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail-headers.c Tue Oct 07 00:06:36 2003 +0300 +++ b/src/lib-storage/index/index-mail-headers.c Tue Oct 07 02:23:37 2003 +0300 @@ -356,21 +356,17 @@ 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; }