clean shutdown
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 5 May 2010 09:46:08 +0000 (09:46 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 5 May 2010 09:46:08 +0000 (09:46 +0000)
src/transport/plugin_transport_http.c

index 3365ef104782fa471e7a9bebc48844c7ab6f0df3..48ffe368f7bfde1aaf1ff95c80f899fab0a5c660 100644 (file)
@@ -419,7 +419,7 @@ libgnunet_plugin_transport_http_init (void *cls)
   struct GNUNET_TRANSPORT_PluginEnvironment *env = cls;
   struct GNUNET_TRANSPORT_PluginFunctions *api;
   long long unsigned int port;
-  struct GNUNET_SERVICE_Context *service;
+  /* struct GNUNET_SERVICE_Context *service; */
   int use_ipv6;
 
   plugin = GNUNET_malloc (sizeof (struct Plugin));
@@ -541,6 +541,11 @@ libgnunet_plugin_transport_http_done (void *cls)
   struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
   struct Plugin *plugin = api->cls;
 
+  if ( http_task != GNUNET_SCHEDULER_NO_TASK)
+  {
+    GNUNET_SCHEDULER_cancel(plugin->env->sched, http_task);
+  }
+
   if (http_daemon != NULL)
   {
     MHD_stop_daemon (http_daemon);