- {
- LOG(GNUNET_ERROR_TYPE_DEBUG,
- "Forwarding PEER_STOP for peer %u\n",
- (unsigned int)peer_id);
- fopc = GNUNET_new(struct ForwardedOperationContext);
- fopc->client = client;
- fopc->operation_id = GNUNET_ntohll(msg->operation_id);
- fopc->type = OP_PEER_STOP;
- fopc->opc =
- GNUNET_TESTBED_forward_operation_msg_(peer->details.remote.
- slave->controller,
- fopc->operation_id,
- &msg->header,
- &GST_forwarded_operation_reply_relay,
- fopc);
- fopc->timeout_task =
- GNUNET_SCHEDULER_add_delayed(GST_timeout,
- &GST_forwarded_operation_timeout,
- fopc);
- GNUNET_CONTAINER_DLL_insert_tail(fopcq_head,
- fopcq_tail,
- fopc);
- GNUNET_SERVICE_client_continue(client);
- return;
- }
- if (GNUNET_OK != stop_peer(peer))
- {
- LOG(GNUNET_ERROR_TYPE_WARNING,
- "Stopping peer %u failed\n",
- (unsigned int)peer_id);
- GST_send_operation_fail_msg(client,
- GNUNET_ntohll(msg->operation_id),
- "Peer not running");
- GNUNET_SERVICE_client_continue(client);
- return;
- }
- LOG(GNUNET_ERROR_TYPE_DEBUG,
- "Peer %u successfully stopped\n",
- (unsigned int)peer_id);
- env = GNUNET_MQ_msg(reply,
- GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT);
- reply->event_type = htonl(GNUNET_TESTBED_ET_PEER_STOP);
- reply->host_id = htonl(GST_context->host_id);
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Forwarding PEER_STOP for peer %u\n",
+ (unsigned int) peer_id);
+ fopc = GNUNET_new (struct ForwardedOperationContext);
+ fopc->client = client;
+ fopc->operation_id = GNUNET_ntohll (msg->operation_id);
+ fopc->type = OP_PEER_STOP;
+ fopc->opc =
+ GNUNET_TESTBED_forward_operation_msg_ (peer->details.remote.
+ slave->controller,
+ fopc->operation_id,
+ &msg->header,
+ &
+ GST_forwarded_operation_reply_relay,
+ fopc);
+ fopc->timeout_task =
+ GNUNET_SCHEDULER_add_delayed (GST_timeout,
+ &GST_forwarded_operation_timeout,
+ fopc);
+ GNUNET_CONTAINER_DLL_insert_tail (fopcq_head,
+ fopcq_tail,
+ fopc);
+ GNUNET_SERVICE_client_continue (client);
+ return;
+ }
+ if (GNUNET_OK != stop_peer (peer))
+ {
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Stopping peer %u failed\n",
+ (unsigned int) peer_id);
+ GST_send_operation_fail_msg (client,
+ GNUNET_ntohll (msg->operation_id),
+ "Peer not running");
+ GNUNET_SERVICE_client_continue (client);
+ return;
+ }
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Peer %u successfully stopped\n",
+ (unsigned int) peer_id);
+ env = GNUNET_MQ_msg (reply,
+ GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT);
+ reply->event_type = htonl (GNUNET_TESTBED_ET_PEER_STOP);
+ reply->host_id = htonl (GST_context->host_id);