dovecot-2.2: lib-storage: If search finds a match to a cached he...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 11 12:32:08 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/4b0a736bc40c
changeset: 16841:4b0a736bc40c
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 11 12:31:48 2013 +0300
description:
lib-storage: If search finds a match to a cached header, don't open the body stream.

diffstat:

 src/lib-storage/index/index-search.c |  2 +-
 src/lib-storage/mail-search.c        |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 78081ecd7eb3 -r 4b0a736bc40c src/lib-storage/index/index-search.c
--- a/src/lib-storage/index/index-search.c	Fri Oct 11 12:22:56 2013 +0300
+++ b/src/lib-storage/index/index-search.c	Fri Oct 11 12:31:48 2013 +0300
@@ -665,7 +665,7 @@
 		mailbox_header_lookup_init(ctx->box, headers);
 	if (headers != NULL &&
 	    (!have_body ||
-	     ctx->cur_mail->lookup_abort == MAIL_LOOKUP_ABORT_NEVER)) {
+	     ctx->cur_mail->lookup_abort != MAIL_LOOKUP_ABORT_NEVER)) {
 		/* try to look up the specified headers from cache */
 		i_assert(*headers != NULL);
 
diff -r 78081ecd7eb3 -r 4b0a736bc40c src/lib-storage/mail-search.c
--- a/src/lib-storage/mail-search.c	Fri Oct 11 12:22:56 2013 +0300
+++ b/src/lib-storage/mail-search.c	Fri Oct 11 12:31:48 2013 +0300
@@ -520,7 +520,7 @@
 
 	*have_headers = have_text || headers->used != 0;
 
-	if (headers->used == 0 || have_text)
+	if (headers->used == 0)
 		return NULL;
 
 	buffer_append(headers, &null, sizeof(const char *));


More information about the dovecot-cvs mailing list