diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-18 13:11:36 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-18 13:11:36 +0000 |
commit | d0d39def77f1f81dd83823e0fe2cfe84a5393a74 (patch) | |
tree | 7c566f79daa839bc74569a415c1b0d2537263280 /src/testbed/testbed_api_peers.c | |
parent | 153c0ba219f50e851aaef92d0cef28f80a33763e (diff) | |
download | gnunet-d0d39def77f1f81dd83823e0fe2cfe84a5393a74.tar.gz gnunet-d0d39def77f1f81dd83823e0fe2cfe84a5393a74.zip |
expose Operation and associated closure in every event
Diffstat (limited to 'src/testbed/testbed_api_peers.c')
-rw-r--r-- | src/testbed/testbed_api_peers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c index 9ad8366f2..b5a66cd5d 100644 --- a/src/testbed/testbed_api_peers.c +++ b/src/testbed/testbed_api_peers.c | |||
@@ -563,13 +563,16 @@ GNUNET_TESTBED_peer_start (void *op_cls, struct GNUNET_TESTBED_Peer *peer, | |||
563 | * "GNUNET_TESTBED_peer_destroy" to fully clean up the | 563 | * "GNUNET_TESTBED_peer_destroy" to fully clean up the |
564 | * state of the peer). | 564 | * state of the peer). |
565 | * | 565 | * |
566 | * @param op_cls the closure for this operation; will be set in the event | ||
567 | * information | ||
566 | * @param peer peer to stop | 568 | * @param peer peer to stop |
567 | * @param pcc function to call upon completion | 569 | * @param pcc function to call upon completion |
568 | * @param pcc_cls closure for 'pcc' | 570 | * @param pcc_cls closure for 'pcc' |
569 | * @return handle to the operation | 571 | * @return handle to the operation |
570 | */ | 572 | */ |
571 | struct GNUNET_TESTBED_Operation * | 573 | struct GNUNET_TESTBED_Operation * |
572 | GNUNET_TESTBED_peer_stop (struct GNUNET_TESTBED_Peer *peer, | 574 | GNUNET_TESTBED_peer_stop (void *op_cls, |
575 | struct GNUNET_TESTBED_Peer *peer, | ||
573 | GNUNET_TESTBED_PeerChurnCallback pcc, void *pcc_cls) | 576 | GNUNET_TESTBED_PeerChurnCallback pcc, void *pcc_cls) |
574 | { | 577 | { |
575 | struct OperationContext *opc; | 578 | struct OperationContext *opc; |
@@ -582,6 +585,7 @@ GNUNET_TESTBED_peer_stop (struct GNUNET_TESTBED_Peer *peer, | |||
582 | opc = GNUNET_malloc (sizeof (struct OperationContext)); | 585 | opc = GNUNET_malloc (sizeof (struct OperationContext)); |
583 | opc->c = peer->controller; | 586 | opc->c = peer->controller; |
584 | opc->data = data; | 587 | opc->data = data; |
588 | opc->op_cls = op_cls; | ||
585 | opc->id = GNUNET_TESTBED_get_next_op_id (opc->c); | 589 | opc->id = GNUNET_TESTBED_get_next_op_id (opc->c); |
586 | opc->type = OP_PEER_STOP; | 590 | opc->type = OP_PEER_STOP; |
587 | opc->op = | 591 | opc->op = |