From 20c50963ee33c2f4bce9ef5fafe7ed3ecb89c70b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 22 Oct 2011 21:10:29 +0000 Subject: [PATCH] more stats --- src/core/gnunet-service-core_kx.c | 4 ++++ src/core/gnunet-service-core_neighbours.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 767554398..7fe5a705f 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c @@ -1025,6 +1025,10 @@ send_keep_alive (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) left = GNUNET_TIME_absolute_get_remaining (kx->timeout); if (left.rel_value == 0) { + GNUNET_STATISTICS_update (GSC_stats, + gettext_noop ("# sessions terminated by timeout"), + 1, + GNUNET_NO); GSC_SESSIONS_end (&kx->peer); kx->status = KX_STATE_DOWN; return; diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c index 596836216..9b33a286e 100644 --- a/src/core/gnunet-service-core_neighbours.c +++ b/src/core/gnunet-service-core_neighbours.c @@ -158,6 +158,10 @@ free_neighbour (struct Neighbour *n) GNUNET_TRANSPORT_notify_transmit_ready_cancel (n->th); n->th = NULL; } + GNUNET_STATISTICS_update (GSC_stats, + gettext_noop ("# sessions terminated by transport disconnect"), + 1, + GNUNET_NO); GSC_SESSIONS_end (&n->peer); if (NULL != n->kxinfo) { -- 2.25.1