0081ed0d90d302027ed4a53cb617c0179c246868 |
|
18-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imap: NOTIFY - Fix crash due to not hooking into commands correctly
The pre/post hooks aren't always called immediately when commands are
created. They're called only after the command input is being read.
Call notify hooks explicitly now immediately when commands are allocated.
Fixes a panic with for example:
a notify set (selected (Messagenew (uid flags) MessageExpunge FlagChange) personal (MessageNew MessageExpunge FlagChange))
b select inbox
c store 1 +flags \deleted
d expunge
e append inbox {10}
Which crashed with:
Panic: file imap-notify.c: line 397 (imap_notify_callback): assertion failed: (client->command_queue_size == 0) |