diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-18 12:58:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-18 12:58:16 +0000 |
commit | 41fb4bc77ef852602063c1723366314ccbefc0a6 (patch) | |
tree | 0d06aaa0076c543c9a073828c04c6c699f8778c4 /src/ats/gnunet-service-ats_scheduling.c | |
parent | 9fae47e9f9555b5d7a10b86b7f2de5cd9e6c0c1c (diff) | |
download | gnunet-41fb4bc77ef852602063c1723366314ccbefc0a6.tar.gz gnunet-41fb4bc77ef852602063c1723366314ccbefc0a6.zip |
always use a slot, even if the session is NULL, simplify logic and document what still needs to be fixed
Diffstat (limited to 'src/ats/gnunet-service-ats_scheduling.c')
-rw-r--r-- | src/ats/gnunet-service-ats_scheduling.c | 19 |
1 files changed, 9 insertions, 10 deletions
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) | |||
93 | * @param plugin_addr binary address for the plugin to use | 93 | * @param plugin_addr binary address for the plugin to use |
94 | * @param plugin_addr_len number of bytes in @a plugin_addr | 94 | * @param plugin_addr_len number of bytes in @a plugin_addr |
95 | * @param local_address_info the local address for the address | 95 | * @param local_address_info the local address for the address |
96 | * @param session_id session ID to use for the given client (other clients will see 0) | 96 | * @param session_id session ID to use for the given client |
97 | * @param atsi performance data for the address | 97 | * @param atsi performance data for the address |
98 | * @param atsi_count number of performance records in @a atsi | 98 | * @param atsi_count number of performance records in @a atsi |
99 | * @param bandwidth_out assigned outbound bandwidth | 99 | * @param bandwidth_out assigned outbound bandwidth |
@@ -499,15 +499,14 @@ GAS_handle_address_destroyed (void *cls, | |||
499 | address, address_length, | 499 | address, address_length, |
500 | ntohl (m->address_local_info), | 500 | ntohl (m->address_local_info), |
501 | ntohl (m->session_id)); | 501 | ntohl (m->session_id)); |
502 | if (0 != ntohl (m->session_id)) | 502 | srm.header.type = ntohs (GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE); |
503 | { | 503 | srm.header.size = ntohs (sizeof (struct SessionReleaseMessage)); |
504 | srm.header.type = ntohs (GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE); | 504 | srm.session_id = m->session_id; |
505 | srm.header.size = ntohs (sizeof (struct SessionReleaseMessage)); | 505 | srm.peer = m->peer; |
506 | srm.session_id = m->session_id; | 506 | GNUNET_SERVER_notification_context_unicast (nc, |
507 | srm.peer = m->peer; | 507 | client, |
508 | GNUNET_SERVER_notification_context_unicast (nc, client, &srm.header, | 508 | &srm.header, |
509 | GNUNET_NO); | 509 | GNUNET_NO); |
510 | } | ||
511 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 510 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
512 | } | 511 | } |
513 | 512 | ||