From 685685e2b281f8884c8df20f0a277a88bbd09e15 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 3 Dec 2012 17:09:01 +0000 Subject: [PATCH] - check the host compatibility check status --- src/testbed/gnunet-testbed-profiler.c | 11 +++++++++++ src/testbed/test_testbed_api_controllerlink.c | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 086a9ef56..0990905e9 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c @@ -717,6 +717,17 @@ host_habitable_cb (void *cls, const struct GNUNET_TESTBED_Host *host, int status static unsigned int hosts_checked; *hc_handle = NULL; + if (GNUNET_NO == status) + { + if ((NULL != host) && (NULL != GNUNET_TESTBED_host_get_hostname_ (host))) + LOG (GNUNET_ERROR_TYPE_ERROR, _("Host %s cannot start testbed\n"), + GNUNET_TESTBED_host_get_hostname_ (host)); + else + LOG (GNUNET_ERROR_TYPE_ERROR, _("Testbed cannot be started on localhost\n")); + GNUNET_SCHEDULER_cancel (abort_task); + abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); + return; + } hosts_checked++; printf (_("\rChecked %u hosts"), hosts_checked); fflush (stdout); diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index cea04cb63..7bcb8b5a7 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c @@ -652,6 +652,13 @@ static void host_habitable_cb (void *cls, const struct GNUNET_TESTBED_Host *_host, int status) { hc_handle = NULL; + if (GNUNET_NO == status) + { + LOG (GNUNET_ERROR_TYPE_ERROR, "Cannot start testbed on localhost\n"); + GNUNET_SCHEDULER_cancel (abort_task); + abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); + return; + } cp = GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, status_cb, NULL); } -- 2.25.1