[svn] - add config option for setting max_clients.

This commit is contained in:
nenolod 2007-03-05 10:58:38 -08:00
parent 68ff929f3d
commit c2d96fcbff
8 changed files with 35 additions and 9 deletions

View file

@ -1,3 +1,14 @@
nenolod 2007/03/05 18:51:17 UTC (20070305-3249)
Log:
- remove get_maxrss() and all of that insecure and unsafe nonsense
Changes: Modified:
+3 -38 trunk/src/ircd.c (File Modified)
+1 -1 trunk/src/restart.c (File Modified)
+0 -4 trunk/src/s_stats.c (File Modified)
nenolod 2007/03/05 18:42:24 UTC (20070305-3247)
Log:
- avoid some potential NULL dereferencing

View file

@ -4,7 +4,7 @@
* Copyright (C) 2002-2005 ircd-ratbox development team
* Copyright (C) 2005-2006 charybdis development team
*
* $Id: example.conf 3195 2007-02-01 01:44:31Z jilles $
* $Id: example.conf 3251 2007-03-05 18:58:38Z nenolod $
*
* See reference.conf for more information.
*/
@ -42,6 +42,11 @@ serverinfo {
#vhost = "192.169.0.1";
/* for IPv6 */
#vhost6 = "3ffe:80e8:546::2";
/* max_clients: This should be set to the amount of connections
* the server can handle.
*/
max_clients = 1024;
};
admin {

View file

@ -6,7 +6,7 @@
*
* Written by ejb, wcampbel, db, leeh and others
*
* $Id: reference.conf 3159 2007-01-25 07:08:21Z nenolod $
* $Id: reference.conf 3251 2007-03-05 18:58:38Z nenolod $
*/
/* IMPORTANT NOTES:
@ -118,6 +118,11 @@ serverinfo {
* This should be an ipv6 IP only.
*/
#vhost6 = "3ffe:80e8:546::2";
/* max_clients: this should be set to the maximum amount of clients
* that the server should support.
*/
max_clients = 1024;
};
/* admin {}: contains admin information about the server. (OLD A:) */

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_conf.h 3131 2007-01-21 15:36:31Z jilles $
* $Id: s_conf.h 3251 2007-03-05 18:58:38Z nenolod $
*/
#ifndef INCLUDED_s_conf_h
@ -298,6 +298,8 @@ struct server_info
#ifdef IPV6
int specific_ipv6_vhost;
#endif
int max_clients;
};
struct admin_info

View file

@ -1 +1 @@
#define SERNO "20070305-3247"
#define SERNO "20070305-3249"

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: ircd.c 3249 2007-03-05 18:51:17Z nenolod $
* $Id: ircd.c 3251 2007-03-05 18:58:38Z nenolod $
*/
#include "stdinc.h"
@ -318,7 +318,7 @@ initialize_global_set_options(void)
memset(&GlobalSetOptions, 0, sizeof(GlobalSetOptions));
/* memset( &ConfigFileEntry, 0, sizeof(ConfigFileEntry)); */
GlobalSetOptions.maxclients = MAX_CLIENTS;
GlobalSetOptions.maxclients = ServerInfo.max_clients;
GlobalSetOptions.autoconn = 1;
GlobalSetOptions.spam_time = MIN_JOIN_LEAVE_TIME;

View file

@ -1,5 +1,5 @@
/* This code is in the public domain.
* $Id: newconf.c 3131 2007-01-21 15:36:31Z jilles $
* $Id: newconf.c 3251 2007-03-05 18:58:38Z nenolod $
*/
#include "stdinc.h"
@ -1918,6 +1918,8 @@ static struct ConfEntry conf_serverinfo_table[] =
{ "vhost", CF_QSTRING, conf_set_serverinfo_vhost, 0, NULL },
{ "vhost6", CF_QSTRING, conf_set_serverinfo_vhost6, 0, NULL },
{ "max_clients", CF_INT, NULL, 0, &ServerInfo.max_clients },
{ "\0", 0, NULL, 0, NULL }
};

View file

@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_conf.c 3223 2007-03-02 17:45:47Z jilles $
* $Id: s_conf.c 3251 2007-03-05 18:58:38Z nenolod $
*/
#include "stdinc.h"
@ -852,7 +852,8 @@ set_default_conf(void)
ConfigFileEntry.reject_after_count = 5;
ConfigFileEntry.reject_ban_time = 300;
ConfigFileEntry.reject_duration = 120;
ServerInfo.max_clients = MAXCONNECTIONS;
}
#undef YES