From 57fd0d7212f6dfc8ae5e158ba2b21253a2b88099 Mon Sep 17 00:00:00 2001 From: xrs Date: Sat, 29 Feb 2020 18:39:43 +0100 Subject: [PATCH] setup channel --- src/cadet/test_cadeT.c | 53 ++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/src/cadet/test_cadeT.c b/src/cadet/test_cadeT.c index cf335a948..1c4a32791 100644 --- a/src/cadet/test_cadeT.c +++ b/src/cadet/test_cadeT.c @@ -56,6 +56,7 @@ #define REQUESTED_PEERS 2 #define CONFIG "test_cadet.conf" #define TESTPROGAM_NAME "test-cadet-channel-resumption" +#define TIMEOUT_IN_SEC 5 #define PORTNAME "cadet_port" /** @@ -78,9 +79,6 @@ static struct GNUNET_HashCode hashed_portname; */ static int test_result = 0; -// FIXME: temp cnt -static int cnt = 0; - /** * Counter for gathering peerinformation. */ @@ -101,10 +99,26 @@ struct TEST_PEERS */ struct GNUNET_PeerIdentity id; + /** + * Handle of TESTBED peer. + */ struct GNUNET_TESTBED_Peer *testbed_peer; + /** + * Testbed management is finished and test peer is ready for test logic. + */ int ready; + /** + * Channel of initiating peer. + */ + struct GNUNET_CADET_Channel *channel; + + /** + * CADET handle. + */ + struct GNUNET_CADET_Handle *cadet; + } test_peers[2]; @@ -117,10 +131,18 @@ struct TEST_PEERS static void shutdown_task (void *cls) { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__); + for (int i=0; i