From 5f44b3dc2423bd1993d692613673f7f007b914ab Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 29 Aug 2012 09:05:25 +0000 Subject: - fix for unix --- src/transport/test_plugin_transport.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/transport/test_plugin_transport.c') diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index 6632244e2..3bd0b7cb0 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c @@ -142,6 +142,9 @@ struct AddressWrapper static void end () { + struct AddressWrapper *w; + int c = 0; + if (GNUNET_SCHEDULER_NO_TASK != timeout_task) { GNUNET_SCHEDULER_cancel (timeout_task); @@ -149,6 +152,26 @@ end () } if (NULL != api) GNUNET_PLUGIN_unload (libname, api); + + while (NULL != head) + { + w = head; + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Plugin did not remove address `%s' \n"), w->addrstring); + GNUNET_CONTAINER_DLL_remove (head, tail, w); + c ++; + GNUNET_free (w->addr); + GNUNET_free (w->addrstring); + GNUNET_free (w); + } + if (c > 0) + { + GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Plugin did not remove %u addresses \n"), c); + } + + GNUNET_free (libname); libname = NULL; GNUNET_STATISTICS_destroy (stats, GNUNET_NO); -- cgit v1.2.3