[svn] - remove the rest of the MAX_CLIENTS stuff. change kqueue implementation accordingly. (needs testing)

This commit is contained in:
nenolod 2007-04-03 02:31:11 -07:00
parent 6fcb8629ae
commit 631ef23987
7 changed files with 5754 additions and 5867 deletions

View File

@ -1,3 +1,28 @@
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.
they are ALL gone. all of this stuff is now determined at runtime via getrlimit(2).
- due to this, devpoll is broken. i'm not motivated to fix it at the moment.
Changes: Modified:
+0 -5 trunk/include/config.h (File Modified)
+0 -5 trunk/include/config.h.dist (File Modified)
+0 -6 trunk/include/defaults.h (File Modified)
+0 -3 trunk/include/m_info.h (File Modified)
+21 -7 trunk/libcharybdis/commio.c (File Modified)
+2 -0 trunk/libcharybdis/commio.h (File Modified)
+1 -2 trunk/libcharybdis/devpoll.c (File Modified)
+4 -3 trunk/libcharybdis/poll.c (File Modified)
+0 -3 trunk/libcharybdis/select.c (File Modified)
+0 -9 trunk/src/ircd.c (File Modified)
+23 -26 trunk/src/listener.c (File Modified)
+2 -1 trunk/src/restart.c (File Modified)
+5 -1 trunk/src/s_auth.c (File Modified)
+1 -1 trunk/src/s_conf.c (File Modified)
+3 -1 trunk/src/s_serv.c (File Modified)
jilles 2007/04/02 22:03:08 UTC (20070402-3350)
Log:
Repair operspy who !#channel, broken by me in r3283.

11546
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
dnl $Id: configure.ac 3323 2007-03-30 23:33:43Z jilles $
dnl $Id: configure.ac 3356 2007-04-03 09:31:11Z nenolod $
dnl Process this file with autoconf to produce a configure script.
dnl TODO: clean up all the OpenSSL and shared module checking stuff;
@ -8,7 +8,7 @@ dnl said functions need to be just about as complex as they already are.
AC_PREREQ(2.57)
dnl Sneaky way to get an Id tag into the configure script
AC_COPYRIGHT([$Id: configure.ac 3323 2007-03-30 23:33:43Z jilles $])
AC_COPYRIGHT([$Id: configure.ac 3356 2007-04-03 09:31:11Z nenolod $])
AC_INIT([charybdis],[2.2.0])
@ -987,23 +987,8 @@ AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (def
fi
], [TOPICLEN=390])
AC_ARG_WITH(maxclients,
AC_HELP_STRING([--with-maxclients=NUMBER],[Maximum number of connections the ircd can handle]),
MAX_CLIENTS="$withval", MAX_CLIENTS=3000)
if test "$MAX_CLIENTS" = yes; then
MAX_CLIENTS=3000
fi
if test $MAX_CLIENTS -gt 65536; then
MAX_CLIENTS=65536
AC_MSG_WARN([Max connections cannot be larger than 65536!])
fi
AC_DEFINE_UNQUOTED(TOPICLEN, ${TOPICLEN}, [Maximum topic length (<=390)])
AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length])
AC_DEFINE_UNQUOTED(MAX_CLIENTS, ${MAX_CLIENTS}, [Maximum number of network connections])
AC_ARG_ENABLE(shared-modules,
AC_HELP_STRING([--disable-shared-modules],[ Disable shared modules.]),

View File

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_info.h 3354 2007-04-03 09:21:31Z nenolod $
* $Id: m_info.h 3356 2007-04-03 09:31:11Z nenolod $
*/
#ifndef INCLUDED_m_info_h
@ -90,8 +90,6 @@ Info MyInformation[] = {
{"IPV6", "OFF", 0, "IPv6 Support"},
#endif
{"MAX_CLIENTS", "", MAX_CLIENTS, "Default maximum Clients"},
{"JOIN_LEAVE_COUNT_EXPIRE_TIME", "", JOIN_LEAVE_COUNT_EXPIRE_TIME,
"Anti SpamBot Parameter"},

View File

@ -1 +1 @@
#define SERNO "20070402-3350"
#define SERNO "20070403-3354"

View File

@ -189,9 +189,6 @@
/* the system's memory page size */
#undef MALLOC_PAGESIZE
/* Maximum number of network connections */
#undef MAX_CLIENTS
/* Sizeof member heap. */
#undef MEMBER_HEAP_SIZE
@ -249,16 +246,16 @@
/* Suffix for shared libraries on this platform. */
#undef SHARED_SUFFIX
/* The size of a `int', as computed by sizeof. */
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `long long', as computed by sizeof. */
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
/* The size of a `short', as computed by sizeof. */
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* Define to 1 if sockaddr has a 'sa_len' member. */
@ -269,7 +266,7 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
@ -334,7 +331,7 @@
/* If system does not define sa_family_t, define it here. */
#undef sa_family_t
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* If we don't have a real socklen_t, unsigned int is good enough. */

View File

@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: kqueue.c 3241 2007-03-05 17:52:28Z jilles $
* $Id: kqueue.c 3356 2007-04-03 09:31:11Z nenolod $
*/
#include "stdinc.h"
@ -30,8 +30,6 @@
#include "libcharybdis.h"
#define KE_LENGTH MAX_CLIENTS
/* jlemon goofed up and didn't add EV_SET until fbsd 4.3 */
#ifndef EV_SET
@ -199,9 +197,13 @@ int
comm_select(unsigned long delay)
{
int num, i;
static struct kevent ke[KE_LENGTH];
static struct kevent *ke = NULL;
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