mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
removed checks for permissions in turtle router, when they are handled by the ServiceControl
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7228 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e865ff2fb6
commit
9cfc9ecee1
@ -777,7 +777,7 @@ int p3turtle::handleIncoming()
|
|||||||
{
|
{
|
||||||
nhandled++;
|
nhandled++;
|
||||||
|
|
||||||
if( (!(_turtle_routing_enabled && _turtle_routing_session_enabled)) || !(RS_SERVICE_PERM_TURTLE & rsPeers->servicePermissionFlags(item->PeerId())))
|
if(!(_turtle_routing_enabled && _turtle_routing_session_enabled))
|
||||||
delete item ;
|
delete item ;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -926,8 +926,8 @@ void p3turtle::handleSearchRequest(RsTurtleSearchRequestItem *item)
|
|||||||
|
|
||||||
for(std::set<RsPeerId>::const_iterator it(onlineIds.begin());it!=onlineIds.end();++it)
|
for(std::set<RsPeerId>::const_iterator it(onlineIds.begin());it!=onlineIds.end();++it)
|
||||||
{
|
{
|
||||||
if(!(RS_SERVICE_PERM_TURTLE & rsPeers->servicePermissionFlags(*it)))
|
// if(!mServiceControl->isPeerConnected(RS_SERVICE_TYPE_TURTLE,*it))
|
||||||
continue ;
|
// continue ;
|
||||||
|
|
||||||
uint32_t linkType = mLinkMgr->getLinkType(*it);
|
uint32_t linkType = mLinkMgr->getLinkType(*it);
|
||||||
|
|
||||||
@ -1484,14 +1484,14 @@ void p3turtle::handleTunnelRequest(RsTurtleOpenTunnelItem *item)
|
|||||||
std::set<RsPeerId> onlineIds ;
|
std::set<RsPeerId> onlineIds ;
|
||||||
mServiceControl->getPeersConnected(RS_SERVICE_TYPE_TURTLE, onlineIds);
|
mServiceControl->getPeersConnected(RS_SERVICE_TYPE_TURTLE, onlineIds);
|
||||||
|
|
||||||
for(std::set<RsPeerId>::iterator it(onlineIds.begin());it!=onlineIds.end();)
|
// for(std::set<RsPeerId>::iterator it(onlineIds.begin());it!=onlineIds.end();)
|
||||||
if(!(RS_SERVICE_PERM_TURTLE & rsPeers->servicePermissionFlags(*it)))
|
// if(!mServiceControl->isPeerConnected(RS_SERVICE_PERM_TURTLE,*it))
|
||||||
{
|
// {
|
||||||
std::set<RsPeerId>::iterator tmp = it++ ;
|
// std::set<RsPeerId>::iterator tmp = it++ ;
|
||||||
onlineIds.erase(tmp) ;
|
// onlineIds.erase(tmp) ;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
++it ;
|
// ++it ;
|
||||||
|
|
||||||
int nb_online_ids = onlineIds.size() ;
|
int nb_online_ids = onlineIds.size() ;
|
||||||
|
|
||||||
@ -1603,7 +1603,7 @@ void p3turtle::handleTunnelResult(RsTurtleTunnelOkItem *item)
|
|||||||
{
|
{
|
||||||
tunnel.local_src = it->second.origin ;
|
tunnel.local_src = it->second.origin ;
|
||||||
tunnel.local_dst = item->PeerId() ;
|
tunnel.local_dst = item->PeerId() ;
|
||||||
tunnel.hash = "" ;
|
tunnel.hash.clear() ;
|
||||||
tunnel.time_stamp = time(NULL) ;
|
tunnel.time_stamp = time(NULL) ;
|
||||||
tunnel.transfered_bytes = 0 ;
|
tunnel.transfered_bytes = 0 ;
|
||||||
tunnel.speed_Bps = 0.0f ;
|
tunnel.speed_Bps = 0.0f ;
|
||||||
|
Loading…
Reference in New Issue
Block a user