From dc7c73c5b7bff9940bd404cf74f58c56345ab6f0 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Tue, 7 Dec 2010 15:04:44 +0000 Subject: [PATCH] strange update neighbor performance function --- src/core/gnunet-service-core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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]); + } } } -- 2.25.1