+ if (GNUNET_NO == peer->details.local.is_running)
+ {
+ emsg = update_peer_config (peer, cfg);
+ if (NULL != emsg)
+ GST_send_operation_fail_msg (client, op_id, emsg);
+ GST_send_operation_success_msg (client, op_id);
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ GNUNET_free_non_null (emsg);
+ return;
+ }
+ prc = GNUNET_new (struct PeerReconfigureContext);
+ if (GNUNET_OK !=
+ GNUNET_TESTING_peer_stop_async (peer->details.local.peer, &prc_stop_cb,
+ prc))
+ {
+ GNUNET_assert (0 < GNUNET_asprintf (&emsg,
+ "Error trying to stop peer %u asynchronously\n",
+ peer_id));
+ LOG (GNUNET_ERROR_TYPE_ERROR, "%s\n", emsg);
+ GST_send_operation_fail_msg (client, op_id, emsg);
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ GNUNET_free (prc);
+ GNUNET_free (emsg);
+ return;
+ }