+/**
+ * The task to be executed if the forwarded peer create operation has been
+ * timed out
+ *
+ * @param cls the FowardedOperationContext
+ * @param tc the TaskContext from the scheduler
+ */
+static void
+peer_create_forward_timeout (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ struct ForwardedOperationContext *fo_ctxt = cls;
+
+ /* send error msg to client */
+ send_operation_fail_msg (fo_ctxt->client, fo_ctxt->operation_id,
+ "Timedout");
+ GNUNET_SERVER_client_drop (fo_ctxt->client);
+ GNUNET_TESTBED_forward_operation_msg_cancel_ (fo_ctxt->opc);
+ GNUNET_free (fo_ctxt);
+}
+
+
+/**
+ * Callback to be called when forwarded peer create operation is
+ * successfull. We have to relay the reply msg back to the client
+ *
+ * @param cls ForwardedOperationContext
+ * @param msg the peer create success message
+ */
+static void
+peer_create_success_cb (void *cls,
+ const struct GNUNET_MessageHeader *msg)
+{
+ struct ForwardedOperationContext *fo_ctxt = cls;
+ struct GNUNET_MessageHeader *dup_msg;
+ uint16_t msize;
+
+ GNUNET_SCHEDULER_cancel (fo_ctxt->timeout_task);
+ GNUNET_assert (ntohs (msg->type) ==
+ GNUNET_MESSAGE_TYPE_TESTBED_PEERCREATESUCCESS);
+ msize = ntohs (msg->size);
+ dup_msg = GNUNET_malloc (msize);
+ (void) memcpy (dup_msg, msg, msize);
+ queue_message (fo_ctxt->client, dup_msg);
+ GNUNET_SERVER_client_drop (fo_ctxt->client);
+ GNUNET_free (fo_ctxt);
+}
+
+
+