From 2d980e4c1be3e4f5e0d8d116b34b2a4cb0819e00 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 19 Jul 2012 08:54:25 +0000 Subject: [PATCH] - some tests did not clean up --- src/transport/test_transport_api_limited_sockets.c | 5 +++++ src/transport/test_transport_startonly.c | 6 +++--- src/transport/test_transport_testing.c | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index c605a3182..e3c294a1c 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c @@ -94,6 +94,8 @@ end () GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); + GNUNET_TRANSPORT_TESTING_done (tth); + } static void @@ -118,6 +120,9 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (p2 != NULL) GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); + if (NULL != th) + GNUNET_TRANSPORT_TESTING_done (tth); + ok = GNUNET_SYSERR; } diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index 0f3e88b1f..8a8fef161 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c @@ -59,6 +59,7 @@ end () GNUNET_SCHEDULER_cancel (timeout_task); timeout_task = GNUNET_SCHEDULER_NO_TASK; } + GNUNET_TRANSPORT_TESTING_done (tth); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n"); } @@ -73,7 +74,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (p1 != NULL) GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); - + if (NULL != tth) + GNUNET_TRANSPORT_TESTING_done (tth); ret = GNUNET_SYSERR; } @@ -137,8 +139,6 @@ run (void *cls, char *const *args, const char *cfgfile, FPRINTF (stderr, "..%i", i); } - tth = GNUNET_TRANSPORT_TESTING_init (); - FPRINTF (stderr, "%s", "\n"); end (); } diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c index 7875f1cfa..9db591306 100644 --- a/src/transport/test_transport_testing.c +++ b/src/transport/test_transport_testing.c @@ -78,7 +78,8 @@ end_badly () if (p2 != NULL) GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); - GNUNET_TRANSPORT_TESTING_done (tth); + if (NULL != tth) + GNUNET_TRANSPORT_TESTING_done (tth); ret = GNUNET_SYSERR; } -- 2.25.1