- Added logging of peers to NSE service
authorBart Polot <bart@net.in.tum.de>
Thu, 8 Dec 2011 01:51:33 +0000 (01:51 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 8 Dec 2011 01:51:33 +0000 (01:51 +0000)
src/nse/gnunet-service-nse.c

index 86b75c9c9960456519945456f5592d74abbfaa72..d72670cb55cd5e15a381534d6c54214114779535 100644 (file)
@@ -1146,6 +1146,7 @@ handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
   peer_entry->transmit_task =
       GNUNET_SCHEDULER_add_delayed (get_transmit_delay (-1), &transmit_task,
                                     peer_entry);
+  GNUNET_STATISTICS_update (stats, "# peers", 1, GNUNET_NO);
 }
 
 
@@ -1181,6 +1182,7 @@ handle_core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
     pos->th = NULL;
   }
   GNUNET_free (pos);
+  GNUNET_STATISTICS_update (stats, "# peers", -1, GNUNET_NO);
 }