]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fixed header searches to work correctly when there are multiple headers...
authorTimo Sirainen <tss@iki.fi>
Wed, 16 Jun 2010 17:29:45 +0000 (18:29 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 16 Jun 2010 17:29:45 +0000 (18:29 +0100)
--HG--
branch : HEAD

src/lib-storage/index/index-search.c

index 01e316334c7d1edf00d2a5e1d11896009a92e5a9..79234568ca7eebba37b46879356b325a0960ba6a 100644 (file)
@@ -536,7 +536,9 @@ static void search_header_arg(struct mail_search_arg *arg,
                ret = message_search_more(msg_search_ctx, &block) ? 1 : 0;
        } T_END;
 
-       ARG_SET_RESULT(arg, ret);
+       /* there may be multiple headers. don't mark this failed yet. */
+       if (ret > 0)
+               ARG_SET_RESULT(arg, 1);
 }
 
 static void search_header_unmatch(struct mail_search_arg *arg,