From: Florian Westphal Date: Thu, 3 Apr 2008 14:16:35 +0000 (+0000) Subject: io.c: fix select FD_SETSIZE check when using epoll as io backend X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=commitdiff_plain;h=3b69da0c52dbe9ece8a2b9100dd92c502812eb7f io.c: fix select FD_SETSIZE check when using epoll as io backend --- diff --git a/src/ngircd/io.c b/src/ngircd/io.c index d40b4850..247da721 100644 --- a/src/ngircd/io.c +++ b/src/ngircd/io.c @@ -12,7 +12,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: io.c,v 1.28 2008/01/02 10:29:51 fw Exp $"; +static char UNUSED id[] = "$Id: io.c,v 1.28.2.1 2008/04/03 14:16:35 fw Exp $"; #include #include @@ -308,7 +308,7 @@ io_event_create(int fd, short what, void (*cbfunc) (int, short)) assert(fd >= 0); #if defined(IO_USE_SELECT) && defined(FD_SETSIZE) - if (fd >= FD_SETSIZE) { + if (io_masterfd < 0 && fd >= FD_SETSIZE) { Log(LOG_ERR, "fd %d exceeds FD_SETSIZE (%u) (select can't handle more file descriptors)", fd, FD_SETSIZE);