guix-env: some update.
[oweals/gnunet.git] / src / testbed / testbed_api.c
index 3f2109ecded2df520fbcee99f37e06516103ebaf..0e0a5da9c9d4881ae3933f1e2daddfc9e2ed0fde 100644 (file)
@@ -75,7 +75,7 @@ struct ForwardedOperationData
   /**
    * The callback to call when reply is available
    */
-  GNUNET_CLIENT_MessageHandler cc;
+  GNUNET_MQ_MessageCallback cc;
 
   /**
    * The closure for the above callback
@@ -1310,7 +1310,13 @@ handle_barrier_status (void *cls,
 
  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);
 }
 
@@ -1362,7 +1368,7 @@ struct OperationContext *
 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;
@@ -1595,7 +1601,7 @@ GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host,
                            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 ()
   };
@@ -1640,7 +1646,7 @@ GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host,
   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,