From: Nathan S. Evans Date: Tue, 7 Dec 2010 15:04:44 +0000 (+0000) Subject: strange update neighbor performance function X-Git-Tag: initial-import-from-subversion-38251~19543 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dc7c73c5b7bff9940bd404cf74f58c56345ab6f0;p=oweals%2Fgnunet.git strange update neighbor performance function --- diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index c9eb8fe6b..76e26cc8f 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -3296,9 +3296,9 @@ update_neighbour_performance (struct Neighbour *n, if (ats_count == 0) return; - for (i=0;iats_count;j++) + for (j=0;j < n->ats_count; j++) { if (n->ats[j].type == ats[i].type) { @@ -3306,10 +3306,12 @@ update_neighbour_performance (struct Neighbour *n, break; } } - if (j == n->ats_count) - GNUNET_array_append (n->ats, - n->ats_count, - *ats); + if (j == n->ats_count) + { + GNUNET_array_append (n->ats, + n->ats_count, + ats[i]); + } } }