From d7de1366e1aa19c8ce84f70d49e79b75b5b8a3b7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 11 Jun 2014 10:53:46 +0000 Subject: [PATCH] -trying to fix #3426 --- src/ats/plugin_ats_proportional.c | 25 +++++++++++++++---------- 1 file 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, remaining_quota_in = net->total_quota_in - (net->active_addresses * min_bw); remaining_quota_out = net->total_quota_out - (net->active_addresses * min_bw); - LOG(GNUNET_ERROR_TYPE_DEBUG, "Remaining bandwidth : (in/out): %llu/%llu \n", - remaining_quota_in, remaining_quota_out); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Remaining bandwidth : (in/out): %llu/%llu \n", + remaining_quota_in, remaining_quota_out); sum_relative_peer_prefences = 0.0; /* Calculate sum of relative preference for active addresses in this network */ @@ -667,18 +668,22 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s, if (count_addresses != net->active_addresses) { - GNUNET_break (0); - LOG(GNUNET_ERROR_TYPE_WARNING, - "%s: Counted %u active addresses, but network says to have %u active addresses \n", - net->desc, count_addresses, net->active_addresses); + LOG ( (count_addresses > net->active_addresses) + ? GNUNET_ERROR_TYPE_WARNING + : GNUNET_ERROR_TYPE_INFO, + "%s: Counted %u active addresses, but network says to have %u active addresses \n", + net->desc, + count_addresses, + net->active_addresses); for (cur_address = net->head; NULL != cur_address; cur_address = cur_address->next) { if (GNUNET_YES != cur_address->addr->active) continue; - - LOG (GNUNET_ERROR_TYPE_WARNING, "Active: `%s' `%s' length %u\n", - GNUNET_i2s (&cur_address->addr->peer), cur_address->addr->plugin, - cur_address->addr->addr_len); + LOG (GNUNET_ERROR_TYPE_WARNING, + "Active: `%s' `%s' length %u\n", + GNUNET_i2s (&cur_address->addr->peer), + cur_address->addr->plugin, + cur_address->addr->addr_len); } } -- 2.25.1