From 41fb4bc77ef852602063c1723366314ccbefc0a6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 18 Jan 2015 12:58:16 +0000 Subject: always use a slot, even if the session is NULL, simplify logic and document what still needs to be fixed --- src/ats/gnunet-service-ats_scheduling.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/ats/gnunet-service-ats_scheduling.c') diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c index 4b346d992..0d8b0fa25 100644 --- a/src/ats/gnunet-service-ats_scheduling.c +++ b/src/ats/gnunet-service-ats_scheduling.c @@ -93,7 +93,7 @@ GAS_scheduling_remove_client (struct GNUNET_SERVER_Client *client) * @param plugin_addr binary address for the plugin to use * @param plugin_addr_len number of bytes in @a plugin_addr * @param local_address_info the local address for the address - * @param session_id session ID to use for the given client (other clients will see 0) + * @param session_id session ID to use for the given client * @param atsi performance data for the address * @param atsi_count number of performance records in @a atsi * @param bandwidth_out assigned outbound bandwidth @@ -499,15 +499,14 @@ GAS_handle_address_destroyed (void *cls, address, address_length, ntohl (m->address_local_info), ntohl (m->session_id)); - if (0 != ntohl (m->session_id)) - { - srm.header.type = ntohs (GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE); - srm.header.size = ntohs (sizeof (struct SessionReleaseMessage)); - srm.session_id = m->session_id; - srm.peer = m->peer; - GNUNET_SERVER_notification_context_unicast (nc, client, &srm.header, - GNUNET_NO); - } + srm.header.type = ntohs (GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE); + srm.header.size = ntohs (sizeof (struct SessionReleaseMessage)); + srm.session_id = m->session_id; + srm.peer = m->peer; + GNUNET_SERVER_notification_context_unicast (nc, + client, + &srm.header, + GNUNET_NO); GNUNET_SERVER_receive_done (client, GNUNET_OK); } -- cgit v1.2.3