/*
This file is part of GNUnet.
- (C) 2011, 2012 Christian Grothoff (and other contributing authors)
+ (C) 2008--2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
{
shutdown_task = GNUNET_SCHEDULER_NO_TASK;
if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ {
GNUNET_SCHEDULER_cancel (abort_task);
+ abort_task = GNUNET_SCHEDULER_NO_TASK;
+ }
if (NULL != cfg)
+ {
GNUNET_CONFIGURATION_destroy (cfg);
+ cfg = NULL;
+ }
GNUNET_SCHEDULER_shutdown (); /* Stop scheduler to shutdown testbed run */
}
{
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;
}
* @param cls closure
* @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
+ * succeeded
+ * @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, 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);