From 3611dcf76150b56c539539929d8e808405bfc6d4 Mon Sep 17 00:00:00 2001 From: nenolod Date: Tue, 3 Apr 2007 02:34:38 -0700 Subject: [PATCH] [svn] - apparently setting KE_LENGTH to 128 is fine. --- ChangeLog | 13 +++++++++++++ include/serno.h | 2 +- libcharybdis/kqueue.c | 10 ++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84f48fe3..38638bfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +nenolod 2007/04/03 09:31:11 UTC (20070403-3356) + Log: + - remove the rest of the MAX_CLIENTS stuff. change kqueue implementation accordingly. (needs testing) + + + Changes: Modified: + +5627 -5747 trunk/configure (File Modified) + +0 -15 trunk/configure.ac (File Modified) + +0 -2 trunk/include/m_info.h (File Modified) + +6 -9 trunk/include/setup.h.in (File Modified) + +5 -3 trunk/libcharybdis/kqueue.c (File Modified) + + nenolod 2007/04/03 09:21:31 UTC (20070403-3354) Log: - remove ALL braindead 2.8 I/O artifacts: MASTER_MAX, HARD_FDLIMIT, HARD_FDLIMIT_, MAXCONNECTIONS, MAX_CLIENTS, etc. diff --git a/include/serno.h b/include/serno.h index 7c904df7..f98d0e1a 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070403-3354" +#define SERNO "20070403-3356" diff --git a/libcharybdis/kqueue.c b/libcharybdis/kqueue.c index 130dd40a..6b82554e 100644 --- a/libcharybdis/kqueue.c +++ b/libcharybdis/kqueue.c @@ -22,7 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: kqueue.c 3356 2007-04-03 09:31:11Z nenolod $ + * $Id: kqueue.c 3358 2007-04-03 09:34:38Z nenolod $ */ #include "stdinc.h" @@ -30,6 +30,8 @@ #include "libcharybdis.h" +#define KE_LENGTH 128 + /* jlemon goofed up and didn't add EV_SET until fbsd 4.3 */ #ifndef EV_SET @@ -197,13 +199,9 @@ int comm_select(unsigned long delay) { int num, i; - static struct kevent *ke = NULL; + static struct kevent ke[KE_LENGTH]; struct timespec poll_time; - /* allocate ke if it has not been allocated already */ - if (ke == NULL) - ke = MyMalloc(sizeof(struct kevent) * comm_get_maxconnections()); - /* * remember we are doing NANOseconds here, not micro/milli. God knows * why jlemon used a timespec, but hey, he wrote the interface, not I