more work on simple plugin
[oweals/gnunet.git] / src / ats / gnunet-service-ats-new.c
index c4ce4e0bbf9a0d868b38af81b8de9848484044c9..d3b2f1ead72c6f539de72a5254a887571c8286ab 100644 (file)
@@ -20,9 +20,6 @@
  * @brief ats service
  * @author Matthias Wachs
  * @author Christian Grothoff
- *
- * TODO:
- * - implement unloading of ATS plugins
  */
 #include "platform.h"
 #include "gnunet_util_lib.h"
@@ -655,6 +652,12 @@ cleanup_task (void *cls)
                               GNUNET_NO);
     stats = NULL;
   }
+  if (NULL != plugin)
+  {
+    GNUNET_PLUGIN_unload (plugin_name,
+                         plugin);
+    plugin = NULL;
+  }
   if (NULL != plugin_name)
   {
     GNUNET_free (plugin_name);