[svn] Make highest connection counts a bit more consistent.

This commit is contained in:
jilles 2007-08-01 13:18:12 -07:00
parent 4f3f411b34
commit 2f15f871ff
4 changed files with 26 additions and 11 deletions

View File

@ -1,3 +1,13 @@
jilles 2007/07/30 17:26:00 UTC (20070730-3540)
Log:
Fix wrong line numbers in ircd.conf parser (some comments).
from ratbox 2.2 (androsyn).
Changes: Modified:
+1 -0 trunk/src/ircd_lexer.l (File Modified)
jilles 2007/07/26 14:21:57 UTC (20070726-3538) jilles 2007/07/26 14:21:57 UTC (20070726-3538)
Log: Log:
Change EmptyString so gcc 4.2 doesn't complain. Change EmptyString so gcc 4.2 doesn't complain.

View File

@ -1 +1 @@
#define SERNO "20070726-3538" #define SERNO "20070730-3540"

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_serv.c 3446 2007-05-14 22:21:16Z jilles $ * $Id: s_serv.c 3542 2007-08-01 20:18:12Z jilles $
*/ */
#include "stdinc.h" #include "stdinc.h"
@ -1131,6 +1131,11 @@ server_estab(struct Client *client_p)
client_p->localClient->firsttime = CurrentTime; client_p->localClient->firsttime = CurrentTime;
/* fixing eob timings.. -gnp */ /* fixing eob timings.. -gnp */
if((dlink_list_length(&lclient_list) + dlink_list_length(&serv_list)) >
(unsigned long)MaxConnectionCount)
MaxConnectionCount = dlink_list_length(&lclient_list) +
dlink_list_length(&serv_list);
/* Show the real host/IP to admins */ /* Show the real host/IP to admins */
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Link with %s established: (%s) link", "Link with %s established: (%s) link",

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 3446 2007-05-14 22:21:16Z jilles $ * $Id: s_user.c 3542 2007-08-01 20:18:12Z jilles $
*/ */
#include "stdinc.h" #include "stdinc.h"
@ -147,6 +147,14 @@ int user_modes[256] = {
int int
show_lusers(struct Client *source_p) show_lusers(struct Client *source_p)
{ {
if(dlink_list_length(&lclient_list) > (unsigned long)MaxClientCount)
MaxClientCount = dlink_list_length(&lclient_list);
if((dlink_list_length(&lclient_list) + dlink_list_length(&serv_list)) >
(unsigned long)MaxConnectionCount)
MaxConnectionCount = dlink_list_length(&lclient_list) +
dlink_list_length(&serv_list);
sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT), sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT),
(Count.total - Count.invisi), (Count.total - Count.invisi),
Count.invisi, dlink_list_length(&global_serv_list)); Count.invisi, dlink_list_length(&global_serv_list));
@ -185,14 +193,6 @@ show_lusers(struct Client *source_p)
MaxConnectionCount, MaxClientCount, MaxConnectionCount, MaxClientCount,
Count.totalrestartcount); Count.totalrestartcount);
if(dlink_list_length(&lclient_list) > (unsigned long)MaxClientCount)
MaxClientCount = dlink_list_length(&lclient_list);
if((dlink_list_length(&lclient_list) + dlink_list_length(&serv_list)) >
(unsigned long)MaxConnectionCount)
MaxConnectionCount = dlink_list_length(&lclient_list) +
dlink_list_length(&serv_list);
return 0; return 0;
} }