about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2008-04-03 20:56:44 +0000
committerFlorian Westphal <fw@strlen.de>2008-04-03 23:20:26 +0200
commit637d739285b814e73a818fb21addd5775910b752 (patch)
tree9682be9a8c4be47507a277452a3b3407d4a3332c /src
parent66e68de16a2c174811cf161654b734a9254456c5 (diff)
downloadngircd-637d739285b814e73a818fb21addd5775910b752.tar.gz
ngircd-637d739285b814e73a818fb21addd5775910b752.zip
io.c: kill select FD_SETSIZE sanity check in io_library_init.
We already have way too many.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/io.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/ngircd/io.c b/src/ngircd/io.c
index 8b8132a1..18a29aa6 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.30 2008/04/03 14:17:42 fw Exp $";
+static char UNUSED id[] = "$Id: io.c,v 1.31 2008/04/03 20:56:44 fw Exp $";
 
 #include <assert.h>
 #include <stdlib.h>
@@ -110,7 +110,11 @@ static bool io_event_change_devpoll(int fd, short what);
 
 static fd_set readers;
 static fd_set writers;
-static int select_maxfd;		/* the select() interface sucks badly */
+/*
+ * this is the first argument for select(), i.e.
+ * the largest fd registered, plus one.
+ */
+static int select_maxfd;
 static int io_dispatch_select(struct timeval *tv);
 
 #ifndef IO_USE_EPOLL
@@ -384,6 +388,9 @@ io_library_init_select(unsigned int eventsize)
 
 		Conf_MaxConnections = FD_SETSIZE - 1;
 	}
+#else
+	Log(LOG_WARNING,
+	    "FD_SETSIZE undefined, don't know how many descriptors select() can handle on your platform ...");
 #endif /* FD_SETSIZE */
 	library_initialized = true;
 }
@@ -622,15 +629,7 @@ io_library_init(unsigned int eventsize)
 {
 	if (library_initialized)
 		return true;
-#ifdef IO_USE_SELECT
-#ifndef FD_SETSIZE
-	Log(LOG_WARNING,
-	    "FD_SETSIZE undefined, don't know how many descriptors select() can handle on your platform ...");
-#else
-	if (eventsize >= FD_SETSIZE)
-		eventsize = FD_SETSIZE - 1;
-#endif /* FD_SETSIZE */
-#endif /* IO_USE_SELECT */
+
 	if ((eventsize > 0) && !array_alloc(&io_events, sizeof(io_event), (size_t)eventsize))
 		eventsize = 0;