/**
* The callback to call when reply is available
*/
- GNUNET_CLIENT_MessageHandler cc;
+ GNUNET_MQ_MessageCallback cc;
/**
* The closure for the above callback
GNUNET_assert (NULL != barrier->cb);
if ((GNUNET_YES == barrier->echo) &&
(GNUNET_TESTBED_BARRIERSTATUS_CROSSED == status))
- GNUNET_TESTBED_queue_message_ (c, GNUNET_copy_message (&msg->header));
- barrier->cb (barrier->cls, name, barrier, status, emsg);
+ GNUNET_TESTBED_queue_message_ (c,
+ GNUNET_copy_message (&msg->header));
+ barrier->cb (barrier->cls,
+ name,
+ barrier,
+ status,
+ emsg);
if (GNUNET_TESTBED_BARRIERSTATUS_INITIALISED == status)
return; /* just initialised; skip cleanup */
cleanup:
GNUNET_free_non_null (emsg);
- if (NULL != barrier)
+ /**
+ * Do not remove the barrier if we did not echo the status back; this is
+ * required at the chained testbed controller setup to ensure the only the
+ * test-driver echos the status and the controller hierarchy properly
+ * propagates the status.
+ */
+ if ((NULL != barrier) && (GNUNET_YES == barrier->echo))
GNUNET_TESTBED_barrier_remove_ (barrier);
}
GNUNET_TESTBED_forward_operation_msg_ (struct GNUNET_TESTBED_Controller *controller,
uint64_t operation_id,
const struct GNUNET_MessageHeader *msg,
- GNUNET_CLIENT_MessageHandler cc,
+ GNUNET_MQ_MessageCallback cc,
void *cc_cls)
{
struct OperationContext *opc;
controller),
GNUNET_MQ_hd_var_size (barrier_status,
GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
- const struct GNUNET_TESTBED_BarrierStatusMsg,
+ struct GNUNET_TESTBED_BarrierStatusMsg,
controller),
GNUNET_MQ_handler_end ()
};
controller->cc_cls = cc_cls;
controller->event_mask = event_mask;
controller->cfg = GNUNET_CONFIGURATION_dup (cfg);
- controller->mq = GNUNET_CLIENT_connecT (controller->cfg,
+ controller->mq = GNUNET_CLIENT_connect (controller->cfg,
"testbed",
handlers,
&mq_error_handler,