void PeerSet::peerHas (Peer::ref ptr) { boost::recursive_mutex::scoped_lock sl (mLock); if (!mPeers.insert (std::make_pair (ptr->getPeerId (), 0)).second) return; newPeer (ptr); }
bool PeerSet::peerHas (Peer::ref ptr) { ScopedLockType sl (mLock, __FILE__, __LINE__); if (!mPeers.insert (std::make_pair (ptr->getPeerId (), 0)).second) return false; newPeer (ptr); return true; }
void PeerSet::badPeer (Peer::ref ptr) { ScopedLockType sl (mLock, __FILE__, __LINE__); mPeers.erase (ptr->getPeerId ()); }
void PeerSet::badPeer (Peer::ref ptr) { boost::recursive_mutex::scoped_lock sl (mLock); mPeers.erase (ptr->getPeerId ()); }