more stats
authorChristian Grothoff <christian@grothoff.org>
Sat, 22 Oct 2011 21:10:29 +0000 (21:10 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 22 Oct 2011 21:10:29 +0000 (21:10 +0000)
src/core/gnunet-service-core_kx.c
src/core/gnunet-service-core_neighbours.c

index 76755439895b1d68bf941668c4efc61e93c8ad92..7fe5a705f6786215b5e6a4d713f5b40f77a58111 100644 (file)
@@ -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;
index 596836216364d7b8e14589042b045a33d2985811..9b33a286eeb9dccea9d7954334cbb081e8415be7 100644 (file)
@@ -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)
   {