From 6ee357f1ac32f1ca6c8012a2d17f09901eb2ed50 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 19 Oct 2009 12:29:04 +0000 Subject: [PATCH] fix --- src/transport/test_plugin_transport.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index 60a33c65a..ec1b6b76c 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c @@ -145,6 +145,15 @@ unload_plugins (void *cls, } +static void +unload_task (void *cls, + const struct GNUNET_SCHEDULER_TaskContext *tc) +{ + struct GNUNET_CONFIGURATION_Handle *cfg = cls; + unload_plugins (NULL, cfg); +} + + static GNUNET_SCHEDULER_TaskIdentifier validation_timeout_task; @@ -169,7 +178,11 @@ validation_notification (void *cls, /* Sailor: if this is the last test, calling this function here will end the process. */ ok = 0; /* if the last test succeeded, report success */ - unload_plugins (NULL, cfg); + GNUNET_SCHEDULER_add_continuation (sched, + GNUNET_NO, + &unload_task, + (void*) cfg, + GNUNET_SCHEDULER_REASON_PREREQ_DONE); } @@ -309,6 +322,7 @@ run (void *cls, GNUNET_asprintf (&libname, "libgnunet_plugin_transport_tcp"); api = GNUNET_PLUGIN_load(libname, &env); + GNUNET_free (libname); if (api == NULL) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, -- 2.25.1