From 2be63d6e73aa46ed4271cf0cc7e6499c64bfade2 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 21 Feb 2012 10:57:01 +0000 Subject: [PATCH] - Fixed assertion in testcase --- src/mesh/test_mesh_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesh/test_mesh_api.c b/src/mesh/test_mesh_api.c index 6fcc8c7ff..d92c25938 100644 --- a/src/mesh/test_mesh_api.c +++ b/src/mesh/test_mesh_api.c @@ -68,6 +68,10 @@ static struct GNUNET_MESH_MessageHandler handlers[] = { {&callback, 1, 0}, static void do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + if (NULL != t) + { + GNUNET_MESH_tunnel_destroy (t); + } if (0 != abort_task) { GNUNET_SCHEDULER_cancel (abort_task); @@ -116,10 +120,6 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) } t = GNUNET_MESH_tunnel_create (mesh, NULL, NULL, NULL, NULL); - if (NULL != t) - { - GNUNET_MESH_tunnel_destroy (t); - } GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5), &do_shutdown, -- 2.25.1