From e45277905e6c82b3f86b6f36e6fa0edeb6cf6ea6 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 27 Mar 2013 12:11:58 +0000 Subject: - exit when an operation fails --- src/testbed/testbed_api_testbed.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 85519c1b9..bceda19a3 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c @@ -627,6 +627,15 @@ event_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) GNUNET_CONTAINER_DLL_remove (rc->dll_op_head, rc->dll_op_tail, dll_op); GNUNET_TESTBED_operation_done (dll_op->op); GNUNET_free (dll_op); + if ( (GNUNET_NO == rc->shutdown) + && (NULL != event->details.operation_finished.emsg) ) + { + LOG (GNUNET_ERROR_TYPE_ERROR, "A operation has failed with error: %s\n", + event->details.operation_finished.emsg); + shutdown_now (rc); + return; + } + GNUNET_assert (GNUNET_YES == rc->shutdown); switch (rc->state) { case RC_LINKED: -- cgit v1.2.3