]> granicus.if.org Git - neomutt/commit
Change imap_cmd_start() to return OK when the cmd_queue is finished. (closes #3956)
authorKevin McCarthy <kevin@8t8.us>
Wed, 19 Jul 2017 21:04:39 +0000 (14:04 -0700)
committerRichard Russon <rich@flatcap.org>
Thu, 3 Aug 2017 15:52:53 +0000 (16:52 +0100)
commit35f8d69a2056c1a6dc3445e8bedf7197081fae25
treeda0ea745b459735255421e8f7b298522e4437a45
parent1b53b9602e1b4788278ff128fbbbd7d6a98f7703
Change imap_cmd_start() to return OK when the cmd_queue is finished. (closes #3956)

Some response handlers can end up recursively calling
imap_cmd_start(), processing all the command completions.  If the
outer call was an imap_exec(), this would result in the loop never
being terminated (or just blocking reading a server that has already
finished all the commands).

Change the callers that are simply using it to read a response,
without having called cmd_start(), to check for IMAP_CMD_OK instead.
Currently this is just the open connection function.
imap/command.c
imap/imap.c