From: Timo Sirainen Date: Fri, 22 May 2015 02:41:43 +0000 (-0400) Subject: fts: Fixed fts_enforced=yes when it has to wait for indexing to finish X-Git-Tag: 2.2.19.rc1~457 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e5170d1dce33cf055cfc2f6fa4b4a61df35d1c5;p=thirdparty%2Fdovecot%2Fcore.git fts: Fixed fts_enforced=yes when it has to wait for indexing to finish --- diff --git a/src/plugins/fts/fts-storage.c b/src/plugins/fts/fts-storage.c index 7add7e0297..abfb8372cd 100644 --- a/src/plugins/fts/fts-storage.c +++ b/src/plugins/fts/fts-storage.c @@ -280,11 +280,7 @@ fts_mailbox_search_next_nonblock(struct mail_search_context *ctx, struct fts_mailbox *fbox = FTS_CONTEXT(ctx->transaction->box); struct fts_search_context *fctx = FTS_CONTEXT(ctx); - if (fctx == NULL) { - /* no fts */ - } else if (!fctx->fts_lookup_success && fctx->enforced) { - return FALSE; - } else if (fctx->indexer_ctx != NULL) { + if (fctx != NULL && fctx->indexer_ctx != NULL) { /* this command is still building the indexes */ if (!fts_mailbox_build_continue(ctx)) { *tryagain_r = TRUE; @@ -295,6 +291,8 @@ fts_mailbox_search_next_nonblock(struct mail_search_context *ctx, return FALSE; } } + if (fctx != NULL && !fctx->fts_lookup_success && fctx->enforced) + return FALSE; return fbox->module_ctx.super. search_next_nonblock(ctx, mail_r, tryagain_r);