]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Fixed io_loop_extract_notify_fd() to compile with kqueue.
authorTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2015 22:07:04 +0000 (01:07 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2015 22:07:04 +0000 (01:07 +0300)
src/lib/ioloop-notify-kqueue.c

index b61c749c98a2f4a66cb131fa3c629d5ed9eca57f..5f40578d56670fb0fed4761626b13d22400eb678 100644 (file)
@@ -207,15 +207,12 @@ int io_loop_extract_notify_fd(struct ioloop *ioloop)
        if (ctx->kq == -1)
                return -1;
 
-       new_kq = inotify_init();
-       if (new_kq == -1) {
-               if (errno != EMFILE)
-                       i_error("inotify_init() failed: %m");
-               else
-                       ioloop_inotify_user_limit_exceeded();
+       new_kq = kqueue();
+       if (new_kq < 0) {
+               i_error("kqueue(notify) failed: %m");
                return -1;
        }
-       for (io = ctx->fd_ctx.notifies; io != NULL; io = io->next)
+       for (io = ctx->notifies; io != NULL; io = io->next)
                io->fd = -1;
        if (ctx->event_io != NULL)
                io_remove(&ctx->event_io);