aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-05 00:53:22 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-05 00:53:22 +0000
commit15dd8e6cc1199d611d804853e134882bf13b234a (patch)
tree7cc90886eabe8d0ffa397a319e12a87042d0ba28 /src/transport/transport_api.c
parentbf6a2c9deeff7a3b384eb029d8267d6099066df3 (diff)
downloadgnunet-15dd8e6cc1199d611d804853e134882bf13b234a.tar.gz
gnunet-15dd8e6cc1199d611d804853e134882bf13b234a.zip
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).
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r--src/transport/transport_api.c12
1 files changed, 7 insertions, 5 deletions
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)
512 if (NULL == n->hn) 512 if (NULL == n->hn)
513 return; 513 return;
514 delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, 514 delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker,
515 n->th->notify_size + n->traffic_overhead); 515 n->th->notify_size + n->traffic_overhead);
516 LOG (GNUNET_ERROR_TYPE_DEBUG, 516 LOG (GNUNET_ERROR_TYPE_DEBUG,
517 "New outbound delay %llu us\n", 517 "New outbound delay %llu us\n",
518 GNUNET_STRINGS_relative_time_to_string (delay, 518 GNUNET_STRINGS_relative_time_to_string (delay,
@@ -703,7 +703,8 @@ demultiplexer (void *cls,
703 "CONNECT", 703 "CONNECT",
704 GNUNET_i2s (&cim->id), 704 GNUNET_i2s (&cim->id),
705 ntohl (cim->quota_out.value__)); 705 ntohl (cim->quota_out.value__));
706 GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, cim->quota_out); 706 GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker,
707 cim->quota_out);
707 if (h->nc_cb != NULL) 708 if (h->nc_cb != NULL)
708 h->nc_cb (h->cls, &n->id); 709 h->nc_cb (h->cls, &n->id);
709 break; 710 break;
@@ -745,9 +746,10 @@ demultiplexer (void *cls,
745 746
746 if (bytes_physical >= bytes_msg) 747 if (bytes_physical >= bytes_msg)
747 { 748 {
748 LOG (GNUNET_ERROR_TYPE_DEBUG, 749 LOG (GNUNET_ERROR_TYPE_DEBUG,
749 "Overhead for %u byte message: %u\n", 750 "Overhead for %u byte message: %u\n",
750 bytes_msg, bytes_physical - bytes_msg); 751 bytes_msg,
752 bytes_physical - bytes_msg);
751 n->traffic_overhead += bytes_physical - bytes_msg; 753 n->traffic_overhead += bytes_physical - bytes_msg;
752 } 754 }
753 GNUNET_break (GNUNET_NO == n->is_ready); 755 GNUNET_break (GNUNET_NO == n->is_ready);