Improvements to the Bad Peer tracking in the DHT.

* Added Interfaces for sharing Bad Peers.
 * Added bdPeerQueue class for storing
 * added doInfoCallback() to inform libretroshare



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4686 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-11-25 00:48:33 +00:00
parent f01d06c806
commit 8d4a7ed4f0
9 changed files with 116 additions and 2 deletions

View file

@ -429,13 +429,15 @@ void bdNode::checkPotentialPeer(bdId *id, bdId *src)
std::cerr << std::endl;
#ifdef TEST_BAD_PEER
std::cerr << "IN TEST MODE... so letting it through.";
std::cerr << "IN TEST MODE... Notifying, but letting it through.";
std::cerr << std::endl;
mBadPeerQueue.queuePeer(id, 0);
#else
mFilterPeers->addBadPeer(id, 0);
// Stores in queue for later callback and desemination around the network.
mBadPeerList->queuePeer(id, 0);
mBadPeerQueue.queuePeer(id, 0);
std::list<struct sockaddr_in> filteredIPs;
mFilterPeers->filteredIPs(filteredIPs);