From d44eb370e41f07e0a3cba50e82bdac755bd5297a Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 19 Oct 2014 21:08:09 +0000 Subject: [PATCH] fixed bug in global router making the routing matrix too sparse git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7623 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/grouter/groutermatrix.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/grouter/groutermatrix.cc b/libretroshare/src/grouter/groutermatrix.cc index 8fdbc9b19..a5732dd70 100644 --- a/libretroshare/src/grouter/groutermatrix.cc +++ b/libretroshare/src/grouter/groutermatrix.cc @@ -53,10 +53,10 @@ bool GRouterMatrix::addRoutingClue(const GRouterKeyId& key_id,const RsPeerId& so // 1 - a user restarts RS very often => keys get republished for some reason // 2 - a user intentionnaly floods a key // - if(!lst.empty() && lst.front().time_stamp + RS_GROUTER_MATRIX_MIN_TIME_BETWEEN_HITS > now) + if(!lst.empty() && lst.front().friend_id == fid && lst.front().time_stamp + RS_GROUTER_MATRIX_MIN_TIME_BETWEEN_HITS > now) { - std::cerr << "GRouterMatrix::addRoutingClue(): too clues for key " << key_id.toStdString() << " in a small interval of " << now - lst.front().time_stamp << " seconds. Flooding?" << std::endl; - return false ; + std::cerr << "GRouterMatrix::addRoutingClue(): too many clues for key " << key_id.toStdString() << " from friend " << source_friend << " in a small interval of " << now - lst.front().time_stamp << " seconds. Flooding?" << std::endl; + return false ; } lst.push_front(rc) ; // create it if necessary