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.2.32.rc1~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1062a885a9a8ebdbcac3a9e768b8f2ab87099962;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 a035f6e216..19f23c7dc7 100644 --- a/src/lib-storage/mailbox-watch.c +++ b/src/lib-storage/mailbox-watch.c @@ -140,7 +140,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";