From 15dd8e6cc1199d611d804853e134882bf13b234a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 5 Feb 2015 00:53:22 +0000 Subject: Various changes: - removed "in_use" from being passed to ATS, no longer needed as we tell ATS when we cannot follow a suggestion by removing the address; simplifies the code a lot - better handling of state machine, fallback to primary session if address switch to new session timed out - nicer logging - more comments - new testcase failures, because of #3652, #3651 and #3650 (or more that i missed). --- src/transport/transport_api.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/transport/transport_api.c') diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index fd352a1e5..a2649db8f 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c @@ -512,7 +512,7 @@ outbound_bw_tracker_update (void *cls) if (NULL == n->hn) return; delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, - n->th->notify_size + n->traffic_overhead); + n->th->notify_size + n->traffic_overhead); LOG (GNUNET_ERROR_TYPE_DEBUG, "New outbound delay %llu us\n", GNUNET_STRINGS_relative_time_to_string (delay, @@ -703,7 +703,8 @@ demultiplexer (void *cls, "CONNECT", GNUNET_i2s (&cim->id), ntohl (cim->quota_out.value__)); - GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, cim->quota_out); + GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, + cim->quota_out); if (h->nc_cb != NULL) h->nc_cb (h->cls, &n->id); break; @@ -745,9 +746,10 @@ demultiplexer (void *cls, if (bytes_physical >= bytes_msg) { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Overhead for %u byte message: %u\n", - bytes_msg, bytes_physical - bytes_msg); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Overhead for %u byte message: %u\n", + bytes_msg, + bytes_physical - bytes_msg); n->traffic_overhead += bytes_physical - bytes_msg; } GNUNET_break (GNUNET_NO == n->is_ready); -- cgit v1.2.3