Commit 75972fa1 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(logout_client): Update the STAT_CLIENTS statistics.

(login_request): Ditto.
(get_host_name): Update the STAT_DNS_QUEUE and STAT_PROCESSED_DNS
	statistics.
parent aa6bbf76
/*
* $Id: connections.c,v 0.102 2003/07/23 08:23:05 ceder Exp $
* $Id: connections.c,v 0.103 2003/07/24 08:38:08 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -257,6 +257,7 @@ logout_client(Connection *cp)
queue_remove(cp);
kill_client(cp); /* Free the Connection */
update_stat(STAT_CLIENTS, -1);
}
/*
......@@ -672,8 +673,13 @@ get_host_name(union isc_address *addr)
if (gettimeofday(&before, NULL) < 0)
kom_log("gettimeofday failed: %s\n", strerror(errno));
update_stat(STAT_DNS_QUEUE, 1);
res = hostname = isc_gethostname(addr, NULL, 0);
update_stat(STAT_DNS_QUEUE, -1);
update_stat(STAT_PROCESSED_DNS, 1);
if (gettimeofday(&after, NULL) < 0)
kom_log("gettimeofday failed: %s\n", strerror(errno));
......@@ -779,6 +785,7 @@ login_request(struct isc_scb *session)
strcpy(cp->peer, peername);
strcpy(cp->peer + hostlen, portbuf);
update_stat(STAT_CLIENTS, 1);
dump_connections();
isc_set_read_callback(session, data_available_callback, write_err_cb, cp);
......
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