From 9cfc9ecee1020f2097a5ffb0d8ce56911fa3aebd Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 3 Apr 2014 21:28:16 +0000 Subject: [PATCH] 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 --- libretroshare/src/turtle/p3turtle.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libretroshare/src/turtle/p3turtle.cc b/libretroshare/src/turtle/p3turtle.cc index 9a7a9302c..fafdf6d14 100644 --- a/libretroshare/src/turtle/p3turtle.cc +++ b/libretroshare/src/turtle/p3turtle.cc @@ -777,7 +777,7 @@ int p3turtle::handleIncoming() { 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 ; else { @@ -926,8 +926,8 @@ void p3turtle::handleSearchRequest(RsTurtleSearchRequestItem *item) for(std::set::const_iterator it(onlineIds.begin());it!=onlineIds.end();++it) { - if(!(RS_SERVICE_PERM_TURTLE & rsPeers->servicePermissionFlags(*it))) - continue ; +// if(!mServiceControl->isPeerConnected(RS_SERVICE_TYPE_TURTLE,*it)) +// continue ; uint32_t linkType = mLinkMgr->getLinkType(*it); @@ -1484,14 +1484,14 @@ void p3turtle::handleTunnelRequest(RsTurtleOpenTunnelItem *item) std::set onlineIds ; mServiceControl->getPeersConnected(RS_SERVICE_TYPE_TURTLE, onlineIds); - for(std::set::iterator it(onlineIds.begin());it!=onlineIds.end();) - if(!(RS_SERVICE_PERM_TURTLE & rsPeers->servicePermissionFlags(*it))) - { - std::set::iterator tmp = it++ ; - onlineIds.erase(tmp) ; - } - else - ++it ; +// for(std::set::iterator it(onlineIds.begin());it!=onlineIds.end();) +// if(!mServiceControl->isPeerConnected(RS_SERVICE_PERM_TURTLE,*it)) +// { +// std::set::iterator tmp = it++ ; +// onlineIds.erase(tmp) ; +// } +// else +// ++it ; int nb_online_ids = onlineIds.size() ; @@ -1603,7 +1603,7 @@ void p3turtle::handleTunnelResult(RsTurtleTunnelOkItem *item) { tunnel.local_src = it->second.origin ; tunnel.local_dst = item->PeerId() ; - tunnel.hash = "" ; + tunnel.hash.clear() ; tunnel.time_stamp = time(NULL) ; tunnel.transfered_bytes = 0 ; tunnel.speed_Bps = 0.0f ;