-ensure stats queues do not grow too big
[oweals/gnunet.git] / src / testbed / testbed_api_statistics.c
index ae5fc131e5b60d041f6edcefe7184b29150f3259..4fd117953ed036514e5f30a354168bf3432eb648 100644 (file)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      Copyright (C) 2008--2013 Christian Grothoff (and other contributing authors)
+      Copyright (C) 2008--2013 GNUnet e.V.
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
@@ -150,10 +150,9 @@ static struct OperationQueue *no_wait_queue;
  * get_statistics operation.
  *
  * @param cls the GetStatsContext
- * @param tc the scheduler task context
  */
 static void
-call_completion_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+call_completion_task (void *cls)
 {
   struct GetStatsContext *sc = cls;
 
@@ -169,10 +168,9 @@ call_completion_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  * as we cannot destroy the statistics handle in iteration_completion_cb()
  *
  * @param cls the PeerGetStatsContext
- * @param tc the scheduler task context
  */
 static void
-op_done_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+op_done_task (void *cls)
 {
   struct PeerGetStatsContext *peer_sc = cls;
   struct GetStatsContext *sc;
@@ -264,10 +262,11 @@ service_connect_comp (void *cls,
   struct PeerGetStatsContext *peer_sc = cls;
   struct GNUNET_STATISTICS_Handle *h = ca_result;
 
-  LOG_DEBUG ("Retrieving statistics of peer %u\n", peer_sc->peer_index);
+  LOG_DEBUG ("Retrieving statistics of peer %u\n",
+             peer_sc->peer_index);
   peer_sc->get_handle =
-      GNUNET_STATISTICS_get (h, peer_sc->sc->subsystem, peer_sc->sc->name,
-                             GNUNET_TIME_UNIT_FOREVER_REL,
+      GNUNET_STATISTICS_get (h, peer_sc->sc->subsystem,
+                             peer_sc->sc->name,
                              &iteration_completion_cb,
                              iterator_cb, peer_sc);
 }