]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_watch_extract_notify_fd() - give better reason if mailbox has...
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 19 Jul 2017 20:11:12 +0000 (23:11 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 19 Jul 2017 20:11:12 +0000 (23:11 +0300)
This happens currently with virtual mailboxes.

src/lib-storage/mailbox-watch.c

index fc014e26c6bde417eaca9a4567639f166b862957..35f4e4151fb32a7696a683d9bce41f80afc84616 100644 (file)
@@ -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";