removing remenants of abstract unix domain socket handling, this finishes addressing...
[oweals/gnunet.git] / src / testbed / gnunet-testbed-profiler.c
index 24b3cdac6c2d3c0e47dab42644f007ce6910a8d9..c6c472f92a6b183f5dacbb517106d7b0f025149c 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "platform.h"
-#include "gnunet_common.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_testbed_service.h"
 #include "testbed_api_hosts.h"
@@ -50,7 +49,7 @@ struct GNUNET_TESTBED_Operation *topology_op;
 /**
  * Name of the file with the hosts to run the test over (configuration option).
  * It will be NULL if ENABLE_LL is set
- */ 
+ */
 static char *hosts_file;
 
 /**
@@ -181,7 +180,8 @@ controller_event_cb (void *cls,
       {
         printf ("\nAborting due to very high failure rate\n");
         print_overlay_links_summary ();
-        GNUNET_SCHEDULER_cancel (abort_task);
+        if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+         GNUNET_SCHEDULER_cancel (abort_task);
         abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
         return;
       }
@@ -208,6 +208,7 @@ controller_event_cb (void *cls,
  * Signature of a main function for a testcase.
  *
  * @param cls closure
+ * @param h the run handle
  * @param num_peers number of peers in 'peers'
  * @param peers handle to peers run in the testbed
  * @param links_succeeded the number of overlay link connection attempts that
@@ -215,16 +216,20 @@ controller_event_cb (void *cls,
  * @param links_failed the number of overlay link
  */
 static void
-test_run (void *cls, unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers,
+test_run (void *cls,
+          struct GNUNET_TESTBED_RunHandle *h,
+          unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers,
           unsigned int links_succeeded,
           unsigned int links_failed)
 {
   result = GNUNET_OK;
   fprintf (stdout, "\n");
   print_overlay_links_summary ();
+#if !ENABLE_LL
   fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n");
   fflush (stdout);
   (void) getc (stdin);
+#endif
   fprintf (stdout, "Shutting down. Please wait\n");
   fflush (stdout);
   shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);