aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-05-07 10:54:03 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-05-07 10:54:03 +0000
commitea931ffc94e1f8145c30c98da50cd5ae9dd5147a (patch)
treea7bb3b5f0fafddeeb00394a7ae83191267e51acd /src/testing/testing.c
parentad25eef39dc8c15b85bd70c6585af95d7e687fd5 (diff)
downloadgnunet-ea931ffc94e1f8145c30c98da50cd5ae9dd5147a.tar.gz
gnunet-ea931ffc94e1f8145c30c98da50cd5ae9dd5147a.zip
- add GNUNET_TESTING_peer_stop_async_cancel()
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 1b2448ffc..f268c38d1 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1539,6 +1539,24 @@ GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer,
1539 1539
1540 1540
1541/** 1541/**
1542 * Cancel a previous asynchronous peer stop request.
1543 * GNUNET_TESTING_peer_stop_async() should have been called before on the given
1544 * peer. It is an error to call this function if the peer stop callback was
1545 * already called
1546 *
1547 * @param peer the peer on which GNUNET_TESTING_peer_stop_async() was called
1548 * before.
1549 */
1550void
1551GNUNET_TESTING_peer_stop_async_cancel (struct GNUNET_TESTING_Peer *peer)
1552{
1553 GNUNET_assert (NULL != peer->ah);
1554 GNUNET_ARM_disconnect_and_free (peer->ah);
1555 peer->ah = NULL;
1556}
1557
1558
1559/**
1542 * Destroy the peer. Releases resources locked during peer configuration. 1560 * Destroy the peer. Releases resources locked during peer configuration.
1543 * If the peer is still running, it will be stopped AND a warning will be 1561 * If the peer is still running, it will be stopped AND a warning will be
1544 * printed (users of the API should stop the peer explicitly first). 1562 * printed (users of the API should stop the peer explicitly first).