aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-17 21:59:51 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-17 21:59:51 +0000
commit122717567d8c65f62dba6790a4573298735af6e6 (patch)
treee10e00a16f8687c62ae30f7b663fc17f28b06246 /src/transport/gnunet-service-transport.c
parent26e4f927ba19749907578fe351e58801409417f9 (diff)
downloadgnunet-122717567d8c65f62dba6790a4573298735af6e6.tar.gz
gnunet-122717567d8c65f62dba6790a4573298735af6e6.zip
cleanup
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r--src/transport/gnunet-service-transport.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 8cbd32dd3..2b551f528 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -395,6 +395,7 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer,
395{ 395{
396 uint32_t bw_in = ntohl (bandwidth_in.value__); 396 uint32_t bw_in = ntohl (bandwidth_in.value__);
397 uint32_t bw_out = ntohl (bandwidth_out.value__); 397 uint32_t bw_out = ntohl (bandwidth_out.value__);
398 struct QuotaSetMessage msg;
398 399
399 /* ATS tells me to disconnect from peer*/ 400 /* ATS tells me to disconnect from peer*/
400 if ((bw_in == 0) && (bw_out == 0)) 401 if ((bw_in == 0) && (bw_out == 0))
@@ -407,20 +408,20 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer,
407 408
408 GST_neighbours_switch_to_address (peer, plugin_name, plugin_addr, 409 GST_neighbours_switch_to_address (peer, plugin_name, plugin_addr,
409 plugin_addr_len, session, ats, ats_count); 410 plugin_addr_len, session, ats, ats_count);
410
411#if DEBUG_TRANSPORT 411#if DEBUG_TRANSPORT
412 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending outbound quota of %u Bps for peer `%s' to all clients\n", 412 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
413 "Sending outbound quota of %u Bps for peer `%s' to all clients\n",
413 ntohl (bandwidth_out.value__), GNUNET_i2s (peer)); 414 ntohl (bandwidth_out.value__), GNUNET_i2s (peer));
414#endif 415#endif
415 struct QuotaSetMessage msg;
416 msg.header.size = htons (sizeof (struct QuotaSetMessage)); 416 msg.header.size = htons (sizeof (struct QuotaSetMessage));
417 msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA); 417 msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA);
418 msg.quota = bandwidth_out; 418 msg.quota = bandwidth_out;
419 msg.peer = (*peer); 419 msg.peer = (*peer);
420 GST_clients_broadcast ((struct GNUNET_MessageHeader *) &msg, GNUNET_NO); 420 GST_clients_broadcast (&msg.header, GNUNET_NO);
421 421
422#if DEBUG_TRANSPORT 422#if DEBUG_TRANSPORT
423 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting inbound quota of %u for peer `%s' to \n", 423 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
424 "Setting inbound quota of %u for peer `%s' to \n",
424 ntohl (bandwidth_in.value__), GNUNET_i2s (peer)); 425 ntohl (bandwidth_in.value__), GNUNET_i2s (peer));
425#endif 426#endif
426 GST_neighbours_set_incoming_quota (peer, bandwidth_in); 427 GST_neighbours_set_incoming_quota (peer, bandwidth_in);