dovecot-2.2: lib: Fixed io_loop_extract_notify_fd() to compile w...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 24 22:07:55 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/f3e6256d3762
changeset: 19002:f3e6256d3762
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 25 01:07:04 2015 +0300
description:
lib: Fixed io_loop_extract_notify_fd() to compile with kqueue.

diffstat:

 src/lib/ioloop-notify-kqueue.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (23 lines):

diff -r acfe208a656d -r f3e6256d3762 src/lib/ioloop-notify-kqueue.c
--- a/src/lib/ioloop-notify-kqueue.c	Mon Aug 24 18:06:42 2015 +0300
+++ b/src/lib/ioloop-notify-kqueue.c	Tue Aug 25 01:07:04 2015 +0300
@@ -207,15 +207,12 @@
 	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);


More information about the dovecot-cvs mailing list