]> 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>
Thu, 20 Jul 2017 07:55:36 +0000 (10:55 +0300)
This happens currently with virtual mailboxes.

src/lib-storage/mailbox-watch.c

index a035f6e2162591549a55ace4652ff09bc9901cad..19f23c7dc74bc9c99b43e1027fa20406f15b415f 100644 (file)
@@ -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";