size_t xc_size;
uint16_t msize;
- GNUNET_assert (OP_PEER_CREATE == opc->type);
+ GNUNET_assert (OP_PEER_CREATE == opc->type);
GNUNET_assert (NULL != data);
GNUNET_assert (NULL != data->peer);
opc->state = OPC_STATE_STARTED;
GNUNET_assert (OP_PEER_START == opc->type);
GNUNET_assert (NULL != (data = opc->data));
GNUNET_assert (NULL != (peer = data->peer));
- GNUNET_assert ((PS_CREATED == peer->state) || (PS_STOPPED == peer->state));
+ GNUNET_assert ((TESTBED_PS_CREATED == peer->state) || (TESTBED_PS_STOPPED == peer->state));
opc->state = OPC_STATE_STARTED;
msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_PeerStartMessage));
msg->header.size = htons (sizeof (struct GNUNET_TESTBED_PeerStartMessage));
GNUNET_assert (NULL != (data = opc->data));
GNUNET_assert (NULL != (peer = data->peer));
- GNUNET_assert (PS_STARTED == peer->state);
+ GNUNET_assert (TESTBED_PS_STARTED == peer->state);
opc->state = OPC_STATE_STARTED;
msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_PeerStopMessage));
msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER);
char *xconfig;
size_t xc_size;
uint16_t msize;
-
+
opc->state = OPC_STATE_STARTED;
GNUNET_assert (NULL != data);
xc_size = GNUNET_TESTBED_compress_config_ (data->config, data->cfg_size,
GNUNET_free (data->config);
data->config = NULL;
GNUNET_assert (xc_size <= UINT16_MAX);
- msize = (uint16_t) xc_size +
+ msize = (uint16_t) xc_size +
sizeof (struct GNUNET_TESTBED_PeerReconfigureMessage);
msg = GNUNET_realloc (xconfig, msize);
(void) memmove (&msg[1], msg, xc_size);
{
struct OperationContext *opc = cls;
struct PeerReconfigureData *data = opc->data;
-
+
switch (opc->state)
{
case OPC_STATE_INIT:
case OPC_STATE_STARTED:
GNUNET_TESTBED_remove_opc_ (opc->c, opc);
break;
- case OPC_STATE_FINISHED:
+ case OPC_STATE_FINISHED:
break;
}
GNUNET_free (opc);
peer->controller = controller;
peer->host = host;
peer->unique_id = id_gen++;
- peer->state = PS_INVALID;
+ peer->state = TESTBED_PS_INVALID;
data = GNUNET_malloc (sizeof (struct PeerCreateData));
data->host = host;
data->cfg = cfg;
struct OperationContext *opc;
struct OverlayConnectData *data;
- GNUNET_assert ((PS_STARTED == p1->state) && (PS_STARTED == p2->state));
+ GNUNET_assert ((TESTBED_PS_STARTED == p1->state) && (TESTBED_PS_STARTED == p2->state));
data = GNUNET_malloc (sizeof (struct OverlayConnectData));
data->p1 = p1;
data->p2 = p2;
struct OperationContext *opc = cls;
struct ManageServiceData *data = opc->data;
struct GNUNET_TESTBED_ManagePeerServiceMessage *msg;
-
- GNUNET_assert (NULL != data);
+
+ GNUNET_assert (NULL != data);
msg = GNUNET_malloc (data->msize);
msg->header.size = htons (data->msize);
msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE);
msg->peer_id = htonl (data->peer->unique_id);
msg->operation_id = GNUNET_htonll (opc->id);
msg->start = (uint8_t) data->start;
- (void) memcpy (&msg[1], data->service_name, data->msize
+ (void) memcpy (&msg[1], data->service_name, data->msize
- sizeof (struct GNUNET_TESTBED_ManagePeerServiceMessage));
GNUNET_free (data->service_name);
data->service_name = NULL;
struct OperationContext *opc;
size_t msize;
- GNUNET_assert (PS_STARTED == peer->state); /* peer is not running? */
+ GNUNET_assert (TESTBED_PS_STARTED == peer->state); /* peer is not running? */
msize = strlen (service_name) + 1;
msize += sizeof (struct GNUNET_TESTBED_ManagePeerServiceMessage);
if (GNUNET_SERVER_MAX_MESSAGE_SIZE < msize)