aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_scheduling.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-13 16:56:41 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-13 16:56:41 +0000
commit35d79cb1941c9f9607195b8760d8a14d836e6397 (patch)
treec4346492cbd6daa665e74720b41ab727da5ed7a1 /src/ats/gnunet-service-ats_scheduling.c
parent10cb35698e245a9f02e577d60541d7e09d7f05ca (diff)
downloadgnunet-35d79cb1941c9f9607195b8760d8a14d836e6397.tar.gz
gnunet-35d79cb1941c9f9607195b8760d8a14d836e6397.zip
implementing 0003268
Diffstat (limited to 'src/ats/gnunet-service-ats_scheduling.c')
-rw-r--r--src/ats/gnunet-service-ats_scheduling.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c
index 48fe536c1..2b77e0e5d 100644
--- a/src/ats/gnunet-service-ats_scheduling.c
+++ b/src/ats/gnunet-service-ats_scheduling.c
@@ -100,16 +100,16 @@ GAS_scheduling_remove_client (struct GNUNET_SERVER_Client *client)
100 */ 100 */
101void 101void
102GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity 102GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity
103 *peer, const char *plugin_name, 103 *peer,
104 const void *plugin_addr, 104 const char *plugin_name,
105 size_t plugin_addr_len, 105 const void *plugin_addr,
106 uint32_t session_id, 106 size_t plugin_addr_len,
107 const struct GNUNET_ATS_Information 107 uint32_t local_address_info,
108 *atsi, uint32_t atsi_count, 108 uint32_t session_id,
109 struct GNUNET_BANDWIDTH_Value32NBO 109 const struct GNUNET_ATS_Information *atsi,
110 bandwidth_out, 110 uint32_t atsi_count,
111 struct GNUNET_BANDWIDTH_Value32NBO 111 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
112 bandwidth_in) 112 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
113{ 113{
114 struct AddressSuggestionMessage *msg; 114 struct AddressSuggestionMessage *msg;
115 size_t plugin_name_length = strlen (plugin_name) + 1; 115 size_t plugin_name_length = strlen (plugin_name) + 1;
@@ -136,6 +136,7 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity
136 msg->peer = *peer; 136 msg->peer = *peer;
137 msg->address_length = htons (plugin_addr_len); 137 msg->address_length = htons (plugin_addr_len);
138 msg->plugin_name_length = htons (plugin_name_length); 138 msg->plugin_name_length = htons (plugin_name_length);
139 msg->address_local_info = htonl (local_address_info);
139 msg->session_id = htonl (session_id); 140 msg->session_id = htonl (session_id);
140 msg->bandwidth_out = bandwidth_out; 141 msg->bandwidth_out = bandwidth_out;
141 msg->bandwidth_in = bandwidth_in; 142 msg->bandwidth_in = bandwidth_in;
@@ -278,7 +279,7 @@ GAS_handle_address_add (void *cls, struct GNUNET_SERVER_Client *client,
278 GNUNET_STATISTICS_update (GSA_stats, "# address updates received", 1, 279 GNUNET_STATISTICS_update (GSA_stats, "# address updates received", 1,
279 GNUNET_NO); 280 GNUNET_NO);
280 GAS_addresses_add (address_handle, &m->peer, plugin_name, address, address_length, 281 GAS_addresses_add (address_handle, &m->peer, plugin_name, address, address_length,
281 ntohl (m->session_id), atsi, ats_count); 282 ntohl(m->address_local_info), ntohl (m->session_id), atsi, ats_count);
282 GNUNET_SERVER_receive_done (client, GNUNET_OK); 283 GNUNET_SERVER_receive_done (client, GNUNET_OK);
283} 284}
284 285
@@ -337,6 +338,7 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client,
337 GNUNET_STATISTICS_update (GSA_stats, "# address updates received", 1, 338 GNUNET_STATISTICS_update (GSA_stats, "# address updates received", 1,
338 GNUNET_NO); 339 GNUNET_NO);
339 GAS_addresses_update (address_handle, &m->peer, plugin_name, address, address_length, 340 GAS_addresses_update (address_handle, &m->peer, plugin_name, address, address_length,
341 ntohl (m->address_local_info),
340 ntohl (m->session_id), atsi, ats_count); 342 ntohl (m->session_id), atsi, ats_count);
341 GNUNET_SERVER_receive_done (client, GNUNET_OK); 343 GNUNET_SERVER_receive_done (client, GNUNET_OK);
342} 344}
@@ -397,6 +399,7 @@ GAS_handle_address_in_use (void *cls, struct GNUNET_SERVER_Client *client,
397 plugin_name, 399 plugin_name,
398 address, 400 address,
399 address_length, 401 address_length,
402 ntohl (m->address_local_info),
400 ntohl (m->session_id), 403 ntohl (m->session_id),
401 in_use); 404 in_use);
402 405
@@ -465,6 +468,7 @@ GAS_handle_address_destroyed (void *cls, struct GNUNET_SERVER_Client *client,
465 GNUNET_STATISTICS_update (GSA_stats, "# addresses destroyed", 1, GNUNET_NO); 468 GNUNET_STATISTICS_update (GSA_stats, "# addresses destroyed", 1, GNUNET_NO);
466 GAS_addresses_destroy (address_handle, &m->peer, plugin_name, 469 GAS_addresses_destroy (address_handle, &m->peer, plugin_name,
467 address, address_length, 470 address, address_length,
471 ntohl (m->address_local_info),
468 ntohl (m->session_id)); 472 ntohl (m->session_id));
469 if (0 != ntohl (m->session_id)) 473 if (0 != ntohl (m->session_id))
470 { 474 {