From 82c994dabc47bb4755c883a1f3651bb5d65cf2c5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 11 Jun 2008 18:56:20 +0200 Subject: [PATCH] Fix max_fd calculation in event_loop_once For some bugs I really wonder how they can go undetected for so long. Fix a bug reported by Mathias Dietz. No samba bugzilla entry, but still 100% needed for 3-2-stable. Volker --- source/lib/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/events.c b/source/lib/events.c index f7bad9bcad1..f5d6480a6f1 100644 --- a/source/lib/events.c +++ b/source/lib/events.c @@ -344,7 +344,7 @@ int event_loop_once(struct event_context *ev) return 0; } - ret = sys_select(maxfd, &r_fds, &w_fds, NULL, &to); + ret = sys_select(maxfd+1, &r_fds, &w_fds, NULL, &to); if (ret == -1 && errno != EINTR) { return -1; -- 2.11.4.GIT