From: Timo Sirainen Date: Wed, 19 Jul 2017 20:11:12 +0000 (+0300) Subject: lib-storage: mailbox_watch_extract_notify_fd() - give better reason if mailbox has... X-Git-Tag: 2.3.0.rc1~1235 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2044eb7652b864a05842933e9097c583cb11256c;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: mailbox_watch_extract_notify_fd() - give better reason if mailbox has no IOs This happens currently with virtual mailboxes. --- diff --git a/src/lib-storage/mailbox-watch.c b/src/lib-storage/mailbox-watch.c index fc014e26c6..35f4e4151f 100644 --- a/src/lib-storage/mailbox-watch.c +++ b/src/lib-storage/mailbox-watch.c @@ -141,7 +141,10 @@ int mailbox_watch_extract_notify_fd(struct mailbox *box, const char **reason_r) } if (failed) ret = -1; - else { + else if (array_count(&temp_ios) == 0) { + *reason_r = "Mailbox has no IO notifications"; + ret = -1; + } else { ret = io_loop_extract_notify_fd(ioloop); if (ret == -1) *reason_r = "Couldn't extra notify fd";