# HG changeset patch # User Aki Tuomi # Date 1481548492 -7200 # Node ID b272b85948e6f53e7057ebc7d9a8fa116ddaece0 # Parent 08eec0b1aae6a0dc5907ed39368ebc435277f4f1 imap: Fix assert when waiting for input on SEARCH/SORT Set cmd->state to CLIENT_COMMAND_STATE_WAIT_EXTERNAL because we are not expecting input or output. Fixes Panic: file imap-client.c: line 854 (client_check_command_hangs): assertion failed: (client->io != NULL || (client->output_cmd_lock != NULL && client->output_cmd_lock != client->input_lock)) diff -r 08eec0b1aae6 -r b272b85948e6 src/imap/imap-search.c --- a/src/imap/imap-search.c Mon Dec 12 12:37:34 2016 +0200 +++ b/src/imap/imap-search.c Mon Dec 12 15:14:52 2016 +0200 @@ -603,6 +603,9 @@ /* we may have moved onto syncing by now */ if (cmd->func == cmd_search_more) ctx->to = timeout_add(0, cmd_search_more_callback, cmd); + + cmd->state = CLIENT_COMMAND_STATE_WAIT_EXTERNAL; + return FALSE; }