- fixes
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 9 May 2012 16:05:25 +0000 (16:05 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 9 May 2012 16:05:25 +0000 (16:05 +0000)
src/ats/gnunet-service-ats.c
src/ats/gnunet-service-ats_scheduling.c

index e8cde18b6604a5b23ef2e36d202fe8fee2214cfe..2f1dc95e860643765a3df8414acb704de5ea5e14 100644 (file)
@@ -57,7 +57,6 @@ handle_ats_start (void *cls, struct GNUNET_SERVER_Client *client,
   const struct ClientStartMessage *msg =
       (const struct ClientStartMessage *) message;
   enum StartFlag flag;
-
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ATS_START");
   flag = ntohl (msg->start_flag);
   switch (flag)
@@ -114,6 +113,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GAS_scheduling_done ();
   GAS_performance_done ();
   GAS_reservations_done ();
+  GNUNET_SERVER_disconnect_notify_cancel (GSA_server, &client_disconnect_handler, NULL);
   if (NULL != GSA_stats)
   {
     GNUNET_STATISTICS_destroy (GSA_stats, GNUNET_NO);
index 563c8f43ccbbb230ca3dd0a15cd6af2af4d644a7..5d03ff007540692fe8fc7d1a97152ec45a2507b5 100644 (file)
@@ -59,7 +59,6 @@ GAS_scheduling_add_client (struct GNUNET_SERVER_Client *client)
   }
   my_client = client;
   GNUNET_SERVER_notification_context_add (nc, client);
-  GNUNET_SERVER_client_keep (client);
   return GNUNET_OK;
 }
 
@@ -76,7 +75,6 @@ GAS_scheduling_remove_client (struct GNUNET_SERVER_Client *client)
   if (my_client != client)
     return;
   GAS_addresses_destroy_all ();
-  GNUNET_SERVER_client_drop (client);
   my_client = NULL;
 }
 
@@ -413,8 +411,13 @@ GAS_scheduling_init (struct GNUNET_SERVER_Handle *server)
 void
 GAS_scheduling_done ()
 {
+  if (NULL != my_client)
+  {
+    my_client = NULL;
+  }
   GNUNET_SERVER_notification_context_destroy (nc);
   nc = NULL;
+
 }