+ GNUNET_assert (num_peers_ == num_peers);
+
+ prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Testbed started in %s\n",
+ GNUNET_STRINGS_relative_time_to_string (prof_time, GNUNET_NO));
+
+ if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ {
+ GNUNET_SCHEDULER_cancel (abort_task);
+ abort_task = GNUNET_SCHEDULER_NO_TASK;
+ }
+
+ for (i = 0; i < num_peers; i++)
+ {
+ peers[i].peer_handle = testbed_peers[i];
+ }
+ if (GNUNET_NO ==
+ GNUNET_CONFIGURATION_get_value_yesno (cfg, "DHT", "DISABLE_TRY_CONNECT"))
+ {
+ struct GNUNET_TIME_Relative settle_time;
+
+ settle_time =
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
+ 10 * num_peers);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Waiting for DHT for %s to settle new connections.\n\n",
+ GNUNET_STRINGS_relative_time_to_string(settle_time, GNUNET_NO));
+ GNUNET_SCHEDULER_add_delayed (settle_time, &do_announce, NULL);
+ }
+ else
+ {
+ GNUNET_SCHEDULER_add_now (&do_announce, NULL);
+ }
+ search_timeout_task =
+ GNUNET_SCHEDULER_add_delayed (search_timeout_time, &search_timed_out, NULL);
+}
+
+/**
+ * Function that will be called whenever something in the testbed changes.
+ *
+ * @param cls closure, NULL
+ * @param event information on what is happening
+ */
+static void
+master_controller_cb (void *cls,
+ const struct GNUNET_TESTBED_EventInformation *event)
+{
+ switch (event->type)
+ {
+ case GNUNET_TESTBED_ET_CONNECT:
+ printf(".");
+ break;
+ case GNUNET_TESTBED_ET_PEER_START:
+ printf("#");
+ break;
+ default:
+ break;
+ }
+ fflush(stdout);