From: Christian Grothoff Date: Thu, 13 Oct 2011 20:55:36 +0000 (+0000) Subject: removing client code X-Git-Tag: initial-import-from-subversion-38251~16540 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f84a545ddf6cfb8b4cf59c9ef40117cd23d836b4;p=oweals%2Fgnunet.git removing client code --- diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c index dff19abea..3e1a5e5ad 100644 --- a/src/ats/gnunet-service-ats.c +++ b/src/ats/gnunet-service-ats.c @@ -61,6 +61,21 @@ handle_ats_start (void *cls, struct GNUNET_SERVER_Client *client, +/** + * A client disconnected from us. Tear down the local client + * record. + * + * @param cls unused + * @param client handle of the client + */ +static void +client_disconnect_handler (void *cls, struct GNUNET_SERVER_Client *client) +{ + GAS_remove_scheduling_client (client); + GAS_remove_performance_client (client); +} + + /** * Task run during shutdown. * @@ -101,6 +116,9 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, {NULL, NULL, 0, 0} }; GAS_addresses_init (); + GNUNET_SERVER_disconnect_notify (server, + &client_disconnect_handler, + NULL); GNUNET_SERVER_add_handlers (server, handlers); GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task, NULL);