Skip to content

Commit

Permalink
lib-storage: Fix mail.access_type for search prefetches
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Feb 21, 2017
1 parent 40e985b commit 3f613b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib-storage/index/index-search.c
Expand Up @@ -1738,13 +1738,15 @@ static bool search_finish_prefetch(struct index_search_context *ctx,
i_assert(imail->mail.mail.lookup_abort == MAIL_LOOKUP_ABORT_NEVER);

ctx->cur_mail = &imail->mail.mail;
ctx->cur_mail->access_type = MAIL_ACCESS_TYPE_SEARCH;
mail_search_args_result_deserialize(ctx->mail_ctx.args,
imail->data.search_results->data,
imail->data.search_results->used);
T_BEGIN {
ret = search_match_once(ctx);
search_match_finish(ctx, ret);
} T_END;
ctx->cur_mail->access_type = MAIL_ACCESS_TYPE_DEFAULT;
ctx->cur_mail = NULL;
return ret > 0;
}
Expand Down

0 comments on commit 3f613b3

Please sign in to comment.