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
This commit is contained in:
csoler 2014-10-19 21:08:09 +00:00
parent 85fce2f2dc
commit d44eb370e4

View File

@ -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