From a41d9df4da2e43c07fba567fc598f2cf3fcc0189 Mon Sep 17 00:00:00 2001 From: Cyril Soler Date: Mon, 1 Feb 2016 09:59:13 -0500 Subject: [PATCH] fixed small bug in probability computation in grouter --- libretroshare/src/grouter/p3grouter.cc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/libretroshare/src/grouter/p3grouter.cc b/libretroshare/src/grouter/p3grouter.cc index d9b441718..c5ebc6a97 100644 --- a/libretroshare/src/grouter/p3grouter.cc +++ b/libretroshare/src/grouter/p3grouter.cc @@ -1137,7 +1137,6 @@ void p3GRouter::locked_collectAvailableFriends(const GRouterKeyId& gxs_id,const #endif // remove incoming peers and peers for which the proba is less than half the maximum proba - float total_probas = 0.0f ; uint32_t count=0; for(uint32_t i=0;i > mypairs ; for(uint32_t i=0;i 0 && max_count > 0) + { + for(int i=mypairs.size()-1,n=0;i>=0 && n=0 && n=0 && n=0 && n