This commit is contained in:
RetroPooh 2017-03-10 11:15:39 +03:00
parent 6a2181ca14
commit 06e4c68065
2 changed files with 4 additions and 4 deletions

View File

@ -2003,12 +2003,12 @@ void p3turtle::getTrafficStatistics(TurtleTrafficStatisticsInfo& info) const
std::string p3turtle::getPeerNameForVirtualPeerId(const RsPeerId& virtual_peer_id) std::string p3turtle::getPeerNameForVirtualPeerId(const RsPeerId& virtual_peer_id)
{ {
RsStackMutex stack(mTurtleMtx); /********** STACK LOCKED MTX ******/
std::string name = "unknown"; std::string name = "unknown";
std::map<TurtleVirtualPeerId,TurtleTunnelId>::const_iterator it(_virtual_peers.find(virtual_peer_id)) ; std::map<TurtleVirtualPeerId,TurtleTunnelId>::const_iterator it(_virtual_peers.find(virtual_peer_id)) ;
if(it != _virtual_peers.end()) if(it != _virtual_peers.end())
{ {
TurtleTunnelId tunnel_id = it->second ; std::map<TurtleTunnelId,TurtleTunnel>::iterator it2( _local_tunnels.find(it->second) ) ;
std::map<TurtleTunnelId,TurtleTunnel>::iterator it2( _local_tunnels.find(tunnel_id) ) ;
if(it2 != _local_tunnels.end()) if(it2 != _local_tunnels.end())
{ {
if(it2->second.local_src == _own_id) if(it2->second.local_src == _own_id)

View File

@ -1392,9 +1392,9 @@ QString TransfersDialog::getPeerName(const RsPeerId& id) const
{ {
res = QString::fromStdString(rsTurtle->getPeerNameForVirtualPeerId(id)); res = QString::fromStdString(rsTurtle->getPeerNameForVirtualPeerId(id));
if(rsFiles->isEncryptedSource(id)) if(rsFiles->isEncryptedSource(id))
return tr("e2ee tunnel ")+QString::fromStdString(id.toStdString()).left(8) + " via " +res ; return tr("Anonymous E2EE tunnel ")+QString::fromStdString(id.toStdString()).left(8) + " via " +res ;
else else
return tr("Anon tunnel ")+QString::fromStdString(id.toStdString()).left(8) + " via " +res ; return tr("Anonymous tunnel id # ")+QString::fromStdString(id.toStdString()).left(8) + " via " +res ;
} }
else else
return res ; return res ;