mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
f5bfc8c92a
commit
9bb5f304b7
@ -170,18 +170,16 @@ 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 ;
|
||||
_virtual_peers[TurtleVirtualPeerId(buff)] = tid ;
|
||||
#ifdef P3TURTLE_DEBUG
|
||||
assert(_local_tunnels.find(tid)!=_local_tunnels.end()) ;
|
||||
assert(_local_tunnels.find(tid)!=_local_tunnels.end()) ;
|
||||
#endif
|
||||
_local_tunnels[tid].vpid = TurtleVirtualPeerId(buff) ;
|
||||
}
|
||||
_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 ;
|
||||
|
@ -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() ;
|
||||
|
Loading…
Reference in New Issue
Block a user