diff --git a/ChangeLog b/ChangeLog index 3defbdb8d..426f628bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/doc/example.conf b/doc/example.conf index 1550d547f..dd10abdbe 100755 --- a/doc/example.conf +++ b/doc/example.conf @@ -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 { diff --git a/doc/reference.conf b/doc/reference.conf index 4b43faef7..d5a4f59ec 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -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:) */ diff --git a/include/s_conf.h b/include/s_conf.h index 628afc25d..df1725868 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -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 diff --git a/include/serno.h b/include/serno.h index 6277065b4..c1985d583 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070305-3247" +#define SERNO "20070305-3249" diff --git a/src/ircd.c b/src/ircd.c index bef2eabc4..0646555c4 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -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; diff --git a/src/newconf.c b/src/newconf.c index 7e2a3766e..c65633f29 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -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 } }; diff --git a/src/s_conf.c b/src/s_conf.c index 4283333eb..5cdccf381 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -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