From: Christian Grothoff Date: Thu, 29 Sep 2011 19:33:12 +0000 (+0000) Subject: report disconnect reasons in stats X-Git-Tag: initial-import-from-subversion-38251~16874 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=24a59107ad07045e59810eaed253d0b1d5ebb5e5;p=oweals%2Fgnunet.git report disconnect reasons in stats --- diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 1b8bb630c..bb10935c1 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -4338,6 +4338,9 @@ neighbour_quota_update (void *cls, "Forcing disconnect of `%4s' due to inactivity\n", GNUNET_i2s (&n->peer)); #endif + GNUNET_STATISTICS_update (stats, + gettext_noop ("# peers disconnected due to inactivity"), 1, + GNUNET_NO); q_in = GNUNET_BANDWIDTH_value_init (0); /* force disconnect */ } #if DEBUG_CORE_QUOTA @@ -4447,6 +4450,9 @@ handle_transport_notify_disconnect (void *cls, GNUNET_break (n->is_connected == GNUNET_YES); if (n->status == PEER_STATE_KEY_CONFIRMED) { + GNUNET_STATISTICS_update (stats, + gettext_noop ("# peers disconnected due to transport disconnect"), 1, + GNUNET_NO); cnm.header.size = htons (sizeof (struct DisconnectNotifyMessage)); cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT); cnm.reserved = htonl (0);