aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_peers.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-10-10 10:59:34 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-10-10 10:59:34 +0000
commite3e2e5839cc3f7c1efb4bee1826f185169b034fa (patch)
tree4dd1a750e24025a5763400b77d07ccb0a3b698a6 /src/testbed/testbed_api_peers.c
parenta0e539e0e1911c2e68df06594624c3f53d569870 (diff)
downloadgnunet-e3e2e5839cc3f7c1efb4bee1826f185169b034fa.tar.gz
gnunet-e3e2e5839cc3f7c1efb4bee1826f185169b034fa.zip
operation id generation from controller host id and internal counter
Diffstat (limited to 'src/testbed/testbed_api_peers.c')
-rw-r--r--src/testbed/testbed_api_peers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c
index ab54cecfa..f9d0929ef 100644
--- a/src/testbed/testbed_api_peers.c
+++ b/src/testbed/testbed_api_peers.c
@@ -439,7 +439,7 @@ GNUNET_TESTBED_peer_create_with_id_ (uint32_t unique_id,
439 opc = GNUNET_malloc (sizeof (struct OperationContext)); 439 opc = GNUNET_malloc (sizeof (struct OperationContext));
440 opc->c = controller; 440 opc->c = controller;
441 opc->data = data; 441 opc->data = data;
442 opc->id = controller->operation_counter++; 442 opc->id = GNUNET_TESTBED_get_next_op_id (controller);
443 opc->type = OP_PEER_CREATE; 443 opc->type = OP_PEER_CREATE;
444 opc->op = 444 opc->op =
445 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_create, 445 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_create,
@@ -515,7 +515,7 @@ GNUNET_TESTBED_peer_start (struct GNUNET_TESTBED_Peer *peer,
515 opc = GNUNET_malloc (sizeof (struct OperationContext)); 515 opc = GNUNET_malloc (sizeof (struct OperationContext));
516 opc->c = peer->controller; 516 opc->c = peer->controller;
517 opc->data = data; 517 opc->data = data;
518 opc->id = opc->c->operation_counter++; 518 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
519 opc->type = OP_PEER_START; 519 opc->type = OP_PEER_START;
520 opc->op = 520 opc->op =
521 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_start, 521 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_start,
@@ -551,7 +551,7 @@ GNUNET_TESTBED_peer_stop (struct GNUNET_TESTBED_Peer *peer,
551 opc = GNUNET_malloc (sizeof (struct OperationContext)); 551 opc = GNUNET_malloc (sizeof (struct OperationContext));
552 opc->c = peer->controller; 552 opc->c = peer->controller;
553 opc->data = data; 553 opc->data = data;
554 opc->id = opc->c->operation_counter++; 554 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
555 opc->type = OP_PEER_STOP; 555 opc->type = OP_PEER_STOP;
556 opc->op = 556 opc->op =
557 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_stop, 557 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_stop,
@@ -595,7 +595,7 @@ GNUNET_TESTBED_peer_get_information (struct GNUNET_TESTBED_Peer *peer,
595 opc->c = peer->controller; 595 opc->c = peer->controller;
596 opc->data = data; 596 opc->data = data;
597 opc->type = OP_PEER_INFO; 597 opc->type = OP_PEER_INFO;
598 opc->id = opc->c->operation_counter++; 598 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
599 opc->op = 599 opc->op =
600 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_getinfo, 600 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_getinfo,
601 &oprelease_peer_getinfo); 601 &oprelease_peer_getinfo);
@@ -641,7 +641,7 @@ GNUNET_TESTBED_peer_destroy (struct GNUNET_TESTBED_Peer *peer)
641 opc = GNUNET_malloc (sizeof (struct OperationContext)); 641 opc = GNUNET_malloc (sizeof (struct OperationContext));
642 opc->data = peer; 642 opc->data = peer;
643 opc->c = peer->controller; 643 opc->c = peer->controller;
644 opc->id = peer->controller->operation_counter++; 644 opc->id = GNUNET_TESTBED_get_next_op_id (peer->controller);
645 opc->type = OP_PEER_DESTROY; 645 opc->type = OP_PEER_DESTROY;
646 opc->op = 646 opc->op =
647 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_destroy, 647 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_destroy,
@@ -710,7 +710,7 @@ GNUNET_TESTBED_overlay_connect (void *op_cls,
710 opc = GNUNET_malloc (sizeof (struct OperationContext)); 710 opc = GNUNET_malloc (sizeof (struct OperationContext));
711 opc->data = data; 711 opc->data = data;
712 opc->c = p1->controller; 712 opc->c = p1->controller;
713 opc->id = opc->c->operation_counter++; 713 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
714 opc->type = OP_OVERLAY_CONNECT; 714 opc->type = OP_OVERLAY_CONNECT;
715 opc->op = 715 opc->op =
716 GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect, 716 GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect,