From 5caf685b62a30b1f935b80a3f9f1bdcefb63a38c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 12 Jun 2017 23:20:12 +0300 Subject: [PATCH] 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. --- src/imap/imap-search.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; } -- 2.47.3