changed function name addDistantPeer to locked_addDistantPeer

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3899 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-12-07 21:45:12 +00:00
parent f5bfc8c92a
commit 9bb5f304b7
2 changed files with 7 additions and 9 deletions

View File

@ -170,19 +170,17 @@ void p3turtle::statusChange(const std::list<pqipeer> &plist) // derived from pqi
// adds a virtual peer to the list that is communicated ot ftController.
//
void p3turtle::addDistantPeer(const TurtleFileHash&,TurtleTunnelId tid)
void p3turtle::locked_addDistantPeer(const TurtleFileHash&,TurtleTunnelId tid)
{
char buff[400] ;
sprintf(buff,"Anonymous F2F tunnel %08x",tid) ;
{
_virtual_peers[TurtleVirtualPeerId(buff)] = tid ;
#ifdef P3TURTLE_DEBUG
assert(_local_tunnels.find(tid)!=_local_tunnels.end()) ;
#endif
_local_tunnels[tid].vpid = TurtleVirtualPeerId(buff) ;
}
}
void p3turtle::getVirtualPeersList(std::list<pqipeer>& list)
{
@ -1513,7 +1511,7 @@ void p3turtle::handleTunnelRequest(RsTurtleOpenTunnelItem *item)
// We add a virtual peer for that tunnel+hash combination.
//
addDistantPeer(item->file_hash,res_item->tunnel_id) ;
locked_addDistantPeer(item->file_hash,res_item->tunnel_id) ;
// Store the size of the file, to be able to re-form data requests to the multiplexer.
//
@ -1643,7 +1641,7 @@ void p3turtle::handleTunnelResult(RsTurtleTunnelOkItem *item)
new_tunnel = true ;
new_hash = it->first ;
addDistantPeer(new_hash,item->tunnel_id) ;
locked_addDistantPeer(new_hash,item->tunnel_id) ;
}
if(!found)
std::cerr << "p3turtle: error. Could not find hash that emmitted tunnel request " << (void*)item->tunnel_id << std::endl ;

View File

@ -313,7 +313,7 @@ class p3turtle: public p3Service, public pqiMonitor, public RsTurtle,/* public f
TurtleRequestId diggTunnel(const TurtleFileHash& hash) ;
/// adds info related to a new virtual peer.
void addDistantPeer(const TurtleFileHash&, TurtleTunnelId) ;
void locked_addDistantPeer(const TurtleFileHash&, TurtleTunnelId) ;
/// estimates the speed of the traffic into tunnels.
void estimateTunnelSpeeds() ;