mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-09 09:35:32 -04:00
turtle tunnel management
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1289 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2bd3899c05
commit
48218e98cb
14 changed files with 351 additions and 99 deletions
|
@ -151,6 +151,27 @@ bool ftTransferModule::addFileSource(std::string peerId)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ftTransferModule::removeFileSource(std::string peerId)
|
||||
{
|
||||
RsStackMutex stack(tfMtx); /******* STACK LOCKED ******/
|
||||
std::map<std::string,peerInfo>::iterator mit;
|
||||
mit = mFileSources.find(peerId);
|
||||
|
||||
if (mit != mFileSources.end())
|
||||
{
|
||||
/* add in new source */
|
||||
mFileSources.erase(mit) ;
|
||||
#ifdef FT_DEBUG
|
||||
std::cerr << "ftTransferModule::addFileSource(): removing peer: " << peerId << " from sourceList" << std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef FT_DEBUG
|
||||
else
|
||||
std::cerr << "ftTransferModule::addFileSource(): Should remove peer: " << peerId << ", but it's not in the source list. " << std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ftTransferModule::setPeerState(std::string peerId,uint32_t state,uint32_t maxRate)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue