+static void
+arm_disconnect_adapter (void *cls, void *op_result)
+{
+ FAIL_TEST (NULL != op_result, return);
+ FAIL_TEST (op_result == arm_handle, return);
+ GNUNET_ARM_disconnect_and_free (arm_handle);
+ arm_handle = NULL;
+ FAIL_TEST (PEER_SERVICE_CONNECT == sub_test, return);
+ FAIL_TEST (NULL != operation, return);
+ operation = GNUNET_TESTBED_peer_stop (NULL, peer, NULL, NULL);
+ FAIL_TEST (NULL != operation, return);
+}
+
+
+/**
+ * Callback to be called when a service connect operation is completed
+ *
+ * @param cls the callback closure from functions generating an operation
+ * @param op the operation that has been finished
+ * @param ca_result the service handle returned from GNUNET_TESTBED_ConnectAdapter()
+ * @param emsg error message in case the operation has failed; will be NULL if
+ * operation has executed successfully.
+ */
+static void
+service_connect_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op,
+ void *ca_result, const char *emsg)