diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-11 10:53:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-11 10:53:46 +0000 |
commit | d7de1366e1aa19c8ce84f70d49e79b75b5b8a3b7 (patch) | |
tree | 9906464f92fe2a25534eeab4b7aaabe643e3894a /src/ats | |
parent | 04f5d7e9bb3ca45ae2122c968f627114988e10b9 (diff) | |
download | gnunet-d7de1366e1aa19c8ce84f70d49e79b75b5b8a3b7.tar.gz gnunet-d7de1366e1aa19c8ce84f70d49e79b75b5b8a3b7.zip |
-trying to fix #3426
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/plugin_ats_proportional.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c index 35d294145..901e11c1d 100644 --- a/src/ats/plugin_ats_proportional.c +++ b/src/ats/plugin_ats_proportional.c | |||
@@ -646,8 +646,9 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s, | |||
646 | 646 | ||
647 | remaining_quota_in = net->total_quota_in - (net->active_addresses * min_bw); | 647 | remaining_quota_in = net->total_quota_in - (net->active_addresses * min_bw); |
648 | remaining_quota_out = net->total_quota_out - (net->active_addresses * min_bw); | 648 | remaining_quota_out = net->total_quota_out - (net->active_addresses * min_bw); |
649 | LOG(GNUNET_ERROR_TYPE_DEBUG, "Remaining bandwidth : (in/out): %llu/%llu \n", | 649 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
650 | remaining_quota_in, remaining_quota_out); | 650 | "Remaining bandwidth : (in/out): %llu/%llu \n", |
651 | remaining_quota_in, remaining_quota_out); | ||
651 | sum_relative_peer_prefences = 0.0; | 652 | sum_relative_peer_prefences = 0.0; |
652 | 653 | ||
653 | /* Calculate sum of relative preference for active addresses in this network */ | 654 | /* Calculate sum of relative preference for active addresses in this network */ |
@@ -667,18 +668,22 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s, | |||
667 | 668 | ||
668 | if (count_addresses != net->active_addresses) | 669 | if (count_addresses != net->active_addresses) |
669 | { | 670 | { |
670 | GNUNET_break (0); | 671 | LOG ( (count_addresses > net->active_addresses) |
671 | LOG(GNUNET_ERROR_TYPE_WARNING, | 672 | ? GNUNET_ERROR_TYPE_WARNING |
672 | "%s: Counted %u active addresses, but network says to have %u active addresses \n", | 673 | : GNUNET_ERROR_TYPE_INFO, |
673 | net->desc, count_addresses, net->active_addresses); | 674 | "%s: Counted %u active addresses, but network says to have %u active addresses \n", |
675 | net->desc, | ||
676 | count_addresses, | ||
677 | net->active_addresses); | ||
674 | for (cur_address = net->head; NULL != cur_address; cur_address = cur_address->next) | 678 | for (cur_address = net->head; NULL != cur_address; cur_address = cur_address->next) |
675 | { | 679 | { |
676 | if (GNUNET_YES != cur_address->addr->active) | 680 | if (GNUNET_YES != cur_address->addr->active) |
677 | continue; | 681 | continue; |
678 | 682 | LOG (GNUNET_ERROR_TYPE_WARNING, | |
679 | LOG (GNUNET_ERROR_TYPE_WARNING, "Active: `%s' `%s' length %u\n", | 683 | "Active: `%s' `%s' length %u\n", |
680 | GNUNET_i2s (&cur_address->addr->peer), cur_address->addr->plugin, | 684 | GNUNET_i2s (&cur_address->addr->peer), |
681 | cur_address->addr->addr_len); | 685 | cur_address->addr->plugin, |
686 | cur_address->addr->addr_len); | ||
682 | } | 687 | } |
683 | } | 688 | } |
684 | 689 | ||