Commit f7e2e4e7 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

dump_allocated_connections now also writes no_of_connection_attempts.

parent 914f9c64
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
......
/*
* $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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment