Mercurial > dovecot > core-2.2
diff src/lib-storage/index/index-search.c @ 458:06377dd1e2a9 HEAD
Added cache_fields_later() to MailIndex interface. That can be used to
specify when some field is wanted to be cached, instead of doing it at every
lookup_field*() call.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 20 Oct 2002 04:12:27 +0300 |
parents | f557fb280fb4 |
children | 00d857873975 |
line wrap: on
line diff
--- a/src/lib-storage/index/index-search.c Sun Oct 20 04:11:03 2002 +0300 +++ b/src/lib-storage/index/index-search.c Sun Oct 20 04:12:27 2002 +0300 @@ -288,8 +288,12 @@ /* get field from hopefully cached envelope */ envelope = index->lookup_field(index, rec, FIELD_TYPE_ENVELOPE); - field = envelope == NULL ? NULL : - imap_envelope_parse(envelope, env_field); + if (envelope != NULL) + field = imap_envelope_parse(envelope, env_field); + else { + index->cache_fields_later(index, rec, FIELD_TYPE_ENVELOPE); + field = NULL; + } if (field == NULL) ret = -1;