diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-06-05 07:49:44 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-06-05 07:49:44 +0000 |
commit | ecc4ae9b8bbd5e5433b83a1527cd9b83487e9bec (patch) | |
tree | 3253221b924217ce460dfd8fb594ee074c422c0c /src | |
parent | 51a395674550157d59f08098a628d6e0d8f5b3cc (diff) | |
download | gnunet-ecc4ae9b8bbd5e5433b83a1527cd9b83487e9bec.tar.gz gnunet-ecc4ae9b8bbd5e5433b83a1527cd9b83487e9bec.zip |
debug code to track down assertion in line 668
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/plugin_ats_proportional.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c index 6414e99ef..61d58cb26 100644 --- a/src/ats/plugin_ats_proportional.c +++ b/src/ats/plugin_ats_proportional.c | |||
@@ -665,7 +665,22 @@ distribute_bandwidth (struct GAS_PROPORTIONAL_Handle *s, | |||
665 | count_addresses ++; | 665 | count_addresses ++; |
666 | } | 666 | } |
667 | 667 | ||
668 | GNUNET_assert (count_addresses == net->active_addresses); | 668 | if (count_addresses != net->active_addresses) |
669 | { | ||
670 | GNUNET_break (0); | ||
671 | LOG(GNUNET_ERROR_TYPE_WARNING, | ||
672 | "%s: Counted %u active addresses, but network says to have %u active addresses \n", | ||
673 | net->desc, count_addresses, net->active_addresses); | ||
674 | for (cur_address = net->head; NULL != cur_address; cur_address = cur_address->next) | ||
675 | { | ||
676 | if (GNUNET_YES != cur_address->addr->active) | ||
677 | continue; | ||
678 | |||
679 | LOG (GNUNET_ERROR_TYPE_WARNING, "Active: `%s' `%s' length %u\n", | ||
680 | GNUNET_i2s (&cur_address->addr->peer), cur_address->addr->plugin, | ||
681 | cur_address->addr->addr_len); | ||
682 | } | ||
683 | } | ||
669 | 684 | ||
670 | LOG (GNUNET_ERROR_TYPE_INFO, | 685 | LOG (GNUNET_ERROR_TYPE_INFO, |
671 | "Total relative preference %.3f for %u addresses in network %s\n", | 686 | "Total relative preference %.3f for %u addresses in network %s\n", |
@@ -1212,7 +1227,8 @@ update_active_address (struct GAS_PROPORTIONAL_Handle *s, | |||
1212 | 1227 | ||
1213 | if (NULL != current_address) | 1228 | if (NULL != current_address) |
1214 | { | 1229 | { |
1215 | if ((NULL == best_address) || ((NULL != best_address) && (GNUNET_NO == address_eq (current_address, best_address)))) | 1230 | if ((NULL == best_address) || ((NULL != best_address) && |
1231 | (GNUNET_NO == address_eq (current_address, best_address)))) | ||
1216 | { | 1232 | { |
1217 | /* We switch to a new address, mark old address as inactive */ | 1233 | /* We switch to a new address, mark old address as inactive */ |
1218 | LOG (GNUNET_ERROR_TYPE_INFO, | 1234 | LOG (GNUNET_ERROR_TYPE_INFO, |