From f7e2e4e7fb136bbaebfa69d4ab88b2127eb9187c Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Tue, 29 Oct 1991 03:16:58 +0000 Subject: [PATCH] dump_allocated_connections now also writes no_of_connection_attempts. --- src/server/ChangeLog | 4 ++++ src/server/internal-connections.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/server/ChangeLog b/src/server/ChangeLog index e16230c5a..83fdead07 100644 --- a/src/server/ChangeLog +++ b/src/server/ChangeLog @@ -1,5 +1,9 @@ Tue Oct 29 03:52:34 1991 Per Cederqvist (ceder at robert) + * internal-connections.c (no_of_connection_attempts): Now a global + variable, so that dump_allocated_connections can write it to the + log files. + * ramkomd.c (dump_exit_statistics): This function, which is only run when the server is brought down nicely, writes some statistics to a log file. The log file is now open in append diff --git a/src/server/internal-connections.c b/src/server/internal-connections.c index 633c81127..e35030436 100644 --- a/src/server/internal-connections.c +++ b/src/server/internal-connections.c @@ -1,5 +1,5 @@ /* - * $Id: internal-connections.c,v 0.5 1991/09/15 10:32:03 linus Exp $ + * $Id: internal-connections.c,v 0.6 1991/10/29 03:16:56 ceder Exp $ * Copyright (C) 1991 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -28,7 +28,7 @@ * Abstract routines on the data type Connection. */ -static char *rcsid = "$Id: internal-connections.c,v 0.5 1991/09/15 10:32:03 linus Exp $"; +static char *rcsid = "$Id: internal-connections.c,v 0.6 1991/10/29 03:16:56 ceder Exp $"; #include "exp.h" @@ -42,6 +42,7 @@ static char *rcsid = "$Id: internal-connections.c,v 0.5 1991/09/15 10:32:03 linu #include "log.h" INTERNAL Connection *all_connections = NULL; +INTERNAL Session_no no_of_connection_attempts = 0; /* Used in get_conn_by_number to speed things up. */ @@ -74,7 +75,6 @@ EXPORT Connection * new_client(void) { Connection *c; - static Session_no no_of_connection_attempts = 0; c = alloc_connection(); @@ -96,7 +96,7 @@ new_client(void) all_connections = c; c->session_no = ++no_of_connection_attempts; - c->protocol = '\0'; /* Reserved to mean 'no protocol specified yet' */ + c->protocol = '\0'; /* Reserved to mean 'no protocol specified yet' */ c->unparsed = EMPTY_STRING; c->first_to_parse = 0; c->more_to_parse = TRUE; @@ -260,4 +260,6 @@ dump_allocated_connections(FILE *fp) { fprintf(fp, "---" __FILE__ ":\n\tConnections: %d\n", no_of_allocated_connections); + fprintf(fp, "\tConnection attempts: %d\n", + no_of_connection_attempts); } -- GitLab