[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).
This commit is contained in:
jilles 2007-04-04 17:24:47 -07:00
parent 23836ead45
commit afc20e91f7
3 changed files with 17 additions and 6 deletions

View file

@ -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) jilles 2007/04/03 22:45:04 UTC (20070403-3384)
Log: Log:
--with-maxclients configure option is gone --with-maxclients configure option is gone

View file

@ -1 +1 @@
#define SERNO "20070403-3384" #define SERNO "20070405-3390"

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA * 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" #include "stdinc.h"
@ -402,10 +402,8 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
* -Taner * -Taner
*/ */
/* Except "F:" clients */ /* Except "F:" clients */
if(((dlink_list_length(&lclient_list) + 1) >= if(dlink_list_length(&lclient_list) >=
((unsigned long)GlobalSetOptions.maxclients + MAX_BUFFER) || (unsigned long)GlobalSetOptions.maxclients && !IsExemptLimits(source_p))
(dlink_list_length(&lclient_list) + 1) >=
((unsigned long)GlobalSetOptions.maxclients - 5)) && !(IsExemptLimits(source_p)))
{ {
sendto_realops_snomask(SNO_FULL, L_ALL, sendto_realops_snomask(SNO_FULL, L_ALL,
"Too many clients, rejecting %s[%s].", source_p->name, source_p->host); "Too many clients, rejecting %s[%s].", source_p->name, source_p->host);