From afc20e91f7699b9125a4438ee268a8c167184bc1 Mon Sep 17 00:00:00 2001 From: jilles Date: Wed, 4 Apr 2007 17:24:47 -0700 Subject: [PATCH] [svn] Change code that checks maxclients limit: allow exactly the configured amount of non-exceed_limit clients. Code that appeared to limit exceed_limit clients too but less heavily removed (it was not effective because the parentheses were wrong). --- ChangeLog | 13 +++++++++++++ include/serno.h | 2 +- src/s_user.c | 8 +++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fac9209a..690082cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +jilles 2007/04/05 00:12:55 UTC (20070405-3390) + Log: + By default, leave MAX_BUFFER fds free for log files, + server connections, ident lookups, exceed_limit clients, + etc. Mention this in example.conf and reference.conf. + + + Changes: Modified: + +4 -2 trunk/doc/example.conf (File Modified) + +3 -1 trunk/doc/reference.conf (File Modified) + +1 -1 trunk/src/s_conf.c (File Modified) + + jilles 2007/04/03 22:45:04 UTC (20070403-3384) Log: --with-maxclients configure option is gone diff --git a/include/serno.h b/include/serno.h index 1bb6b9f9..9fdeed7b 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070403-3384" +#define SERNO "20070405-3390" diff --git a/src/s_user.c b/src/s_user.c index 62e7868b..071c4952 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.c 3370 2007-04-03 10:15:39Z nenolod $ + * $Id: s_user.c 3392 2007-04-05 00:24:47Z jilles $ */ #include "stdinc.h" @@ -402,10 +402,8 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char * -Taner */ /* Except "F:" clients */ - if(((dlink_list_length(&lclient_list) + 1) >= - ((unsigned long)GlobalSetOptions.maxclients + MAX_BUFFER) || - (dlink_list_length(&lclient_list) + 1) >= - ((unsigned long)GlobalSetOptions.maxclients - 5)) && !(IsExemptLimits(source_p))) + if(dlink_list_length(&lclient_list) >= + (unsigned long)GlobalSetOptions.maxclients && !IsExemptLimits(source_p)) { sendto_realops_snomask(SNO_FULL, L_ALL, "Too many clients, rejecting %s[%s].", source_p->name, source_p->host);