From 50f5be5f60ff17d53526c97670f019721881286f Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 21 Feb 2012 11:25:26 +0000 Subject: [PATCH] - Destroy tunnel to avoid api complaints, initialize return value explicitly --- src/mesh/test_mesh_local_1.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesh/test_mesh_local_1.c b/src/mesh/test_mesh_local_1.c index a7ca77ccd..8e1e9b2d0 100644 --- a/src/mesh/test_mesh_local_1.c +++ b/src/mesh/test_mesh_local_1.c @@ -55,6 +55,10 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { GNUNET_SCHEDULER_cancel (abort_task); } + if (NULL != t) + { + GNUNET_MESH_tunnel_destroy(t); + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: D1\n"); if (NULL != mesh_peer_1) { @@ -173,7 +177,7 @@ inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, /** - * Method called whenever a peer has disconnected from the tunnel. + * Method called whenever a peer has connected to the tunnel. * * @param cls closure * @param peer peer identity the tunnel stopped working with @@ -222,6 +226,7 @@ static struct GNUNET_MESH_MessageHandler handlers2[] = { {NULL, 0, 0} }; static void do_find (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: CONNECT BY TYPE\n"); GNUNET_MESH_peer_request_connect_by_type (t, 1); } @@ -319,6 +324,7 @@ main (int argc, char *argv[]) GNUNET_GETOPT_OPTION_END }; + result = GNUNET_OK; ret = GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, "test-mesh-local", "nohelp", options, &run, NULL); -- 2.25.1