From: Timo Sirainen Date: Mon, 12 Jun 2017 20:20:12 +0000 (+0300) Subject: imap: Fix pipelining commands with SEARCH X-Git-Tag: 2.3.0.rc1~1424 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5caf685b62a30b1f935b80a3f9f1bdcefb63a38c;p=thirdparty%2Fdovecot%2Fcore.git imap: Fix pipelining commands with SEARCH If the SEARCH wasn't a long-running one, it ends with going to sync. The command state shouldn't then be changed to _WAIT_EXTERNAL. --- diff --git a/src/imap/imap-search.c b/src/imap/imap-search.c index b0da519302..f895ca12e7 100644 --- a/src/imap/imap-search.c +++ b/src/imap/imap-search.c @@ -602,11 +602,10 @@ bool imap_search_start(struct imap_search_context *ctx, return TRUE; /* we may have moved onto syncing by now */ - if (cmd->func == cmd_search_more) + if (cmd->func == cmd_search_more) { ctx->to = timeout_add(0, cmd_search_more_callback, cmd); - - cmd->state = CLIENT_COMMAND_STATE_WAIT_EXTERNAL; - + cmd->state = CLIENT_COMMAND_STATE_WAIT_EXTERNAL; + } return FALSE; }