diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-12 15:18:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-12 15:18:35 +0000 |
commit | bd609b6739575ae2bddf2f4b8556282617ba5c7c (patch) | |
tree | cdff934d5969e97d788ca56ad91529d4ceb3043b /src/ats | |
parent | 47f8e95b1b10961d37e7fd3ae26c697130ce9e91 (diff) | |
download | gnunet-bd609b6739575ae2bddf2f4b8556282617ba5c7c.tar.gz gnunet-bd609b6739575ae2bddf2f4b8556282617ba5c7c.zip |
-revert 33649, see #3426
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/plugin_ats_mlp.c | 2 | ||||
-rw-r--r-- | src/ats/plugin_ats_proportional.c | 25 |
2 files changed, 10 insertions, 17 deletions
diff --git a/src/ats/plugin_ats_mlp.c b/src/ats/plugin_ats_mlp.c index 98244c9ae..c2f8530e1 100644 --- a/src/ats/plugin_ats_mlp.c +++ b/src/ats/plugin_ats_mlp.c | |||
@@ -24,8 +24,6 @@ | |||
24 | * @author Matthias Wachs | 24 | * @author Matthias Wachs |
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | |||
28 | #include "plugin_ats_mlp.h" | ||
29 | #include "platform.h" | 27 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_ats_service.h" | 29 | #include "gnunet_ats_service.h" |
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c index 40908e6f8..2fda9fe13 100644 --- a/src/ats/plugin_ats_proportional.c +++ b/src/ats/plugin_ats_proportional.c | |||
@@ -561,9 +561,8 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s, | |||
561 | 561 | ||
562 | remaining_quota_in = net->total_quota_in - (net->active_addresses * min_bw); | 562 | remaining_quota_in = net->total_quota_in - (net->active_addresses * min_bw); |
563 | remaining_quota_out = net->total_quota_out - (net->active_addresses * min_bw); | 563 | remaining_quota_out = net->total_quota_out - (net->active_addresses * min_bw); |
564 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 564 | LOG(GNUNET_ERROR_TYPE_DEBUG, "Remaining bandwidth : (in/out): %llu/%llu \n", |
565 | "Remaining bandwidth : (in/out): %llu/%llu \n", | 565 | remaining_quota_in, remaining_quota_out); |
566 | remaining_quota_in, remaining_quota_out); | ||
567 | sum_relative_peer_prefences = 0.0; | 566 | sum_relative_peer_prefences = 0.0; |
568 | 567 | ||
569 | /* Calculate sum of relative preference for active addresses in this network */ | 568 | /* Calculate sum of relative preference for active addresses in this network */ |
@@ -583,22 +582,18 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s, | |||
583 | 582 | ||
584 | if (count_addresses != net->active_addresses) | 583 | if (count_addresses != net->active_addresses) |
585 | { | 584 | { |
586 | LOG ( (count_addresses > net->active_addresses) | 585 | GNUNET_break (0); |
587 | ? GNUNET_ERROR_TYPE_WARNING | 586 | LOG(GNUNET_ERROR_TYPE_WARNING, |
588 | : GNUNET_ERROR_TYPE_INFO, | 587 | "%s: Counted %u active addresses, but network says to have %u active addresses \n", |
589 | "%s: Counted %u active addresses, but network says to have %u active addresses \n", | 588 | net->desc, count_addresses, net->active_addresses); |
590 | net->desc, | ||
591 | count_addresses, | ||
592 | net->active_addresses); | ||
593 | for (cur_address = net->head; NULL != cur_address; cur_address = cur_address->next) | 589 | for (cur_address = net->head; NULL != cur_address; cur_address = cur_address->next) |
594 | { | 590 | { |
595 | if (GNUNET_YES != cur_address->addr->active) | 591 | if (GNUNET_YES != cur_address->addr->active) |
596 | continue; | 592 | continue; |
597 | LOG (GNUNET_ERROR_TYPE_WARNING, | 593 | |
598 | "Active: `%s' `%s' length %u\n", | 594 | LOG (GNUNET_ERROR_TYPE_WARNING, "Active: `%s' `%s' length %u\n", |
599 | GNUNET_i2s (&cur_address->addr->peer), | 595 | GNUNET_i2s (&cur_address->addr->peer), cur_address->addr->plugin, |
600 | cur_address->addr->plugin, | 596 | cur_address->addr->addr_len); |
601 | cur_address->addr->addr_len); | ||
602 | } | 597 | } |
603 | } | 598 | } |
604 | 599 | ||