aboutsummaryrefslogtreecommitdiff
path: root/src/ats/plugin_ats_proportional.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-08 15:22:16 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-08 15:22:16 +0000
commit4a86cb2b78634385c8819f8b9b996aaefe6bf780 (patch)
tree56076cd6e7d1f7cace7a988f690826399444bc90 /src/ats/plugin_ats_proportional.c
parent23818fb1b0be92a7c840fbc24eb6c4efa44b98cd (diff)
downloadgnunet-4a86cb2b78634385c8819f8b9b996aaefe6bf780.tar.gz
gnunet-4a86cb2b78634385c8819f8b9b996aaefe6bf780.zip
-clarify API
Diffstat (limited to 'src/ats/plugin_ats_proportional.c')
-rw-r--r--src/ats/plugin_ats_proportional.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c
index b4cabb067..96ff1a0c0 100644
--- a/src/ats/plugin_ats_proportional.c
+++ b/src/ats/plugin_ats_proportional.c
@@ -542,8 +542,8 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s,
542 if (GNUNET_YES != cur_address->addr->active) 542 if (GNUNET_YES != cur_address->addr->active)
543 continue; 543 continue;
544 544
545 GNUNET_assert( NULL != (peer_relative_prefs = s->env->get_preferences (s->env->cls, 545 peer_relative_prefs = s->env->get_preferences (s->env->cls,
546 &cur_address->addr->peer))); 546 &cur_address->addr->peer);
547 relative_peer_prefence = 0.0; 547 relative_peer_prefence = 0.0;
548 relative_peer_prefence += peer_relative_prefs[GNUNET_ATS_PREFERENCE_BANDWIDTH]; 548 relative_peer_prefence += peer_relative_prefs[GNUNET_ATS_PREFERENCE_BANDWIDTH];
549 sum_relative_peer_prefences += relative_peer_prefence; 549 sum_relative_peer_prefences += relative_peer_prefence;
@@ -577,9 +577,8 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s,
577 { 577 {
578 if (GNUNET_YES == cur_address->addr->active) 578 if (GNUNET_YES == cur_address->addr->active)
579 { 579 {
580 GNUNET_assert( NULL != (peer_relative_prefs = 580 peer_relative_prefs = s->env->get_preferences (s->env->cls,
581 s->env->get_preferences (s->env->cls, 581 &cur_address->addr->peer);
582 &cur_address->addr->peer)));
583 582
584 cur_pref = peer_relative_prefs[GNUNET_ATS_PREFERENCE_BANDWIDTH]; 583 cur_pref = peer_relative_prefs[GNUNET_ATS_PREFERENCE_BANDWIDTH];
585 total_weight = net->active_addresses + 584 total_weight = net->active_addresses +