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

@ -89,6 +89,14 @@ UdpBitDht::~UdpBitDht()
/***** Functions to Call down to bdNodeManager ****/
/* Friend Tracking */
void UdpBitDht::addBadPeer(const struct sockaddr_in &addr, uint32_t source, uint32_t reason, uint32_t age)
{
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
mBitDhtManager->addBadPeer(addr, source, reason, age);
}
void UdpBitDht::updateKnownPeer(const bdId *id, uint32_t type, uint32_t flags)
{
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/