diff --git a/libretroshare/src/turtle/p3turtle.cc b/libretroshare/src/turtle/p3turtle.cc index fafdf6d14..3034d555f 100644 --- a/libretroshare/src/turtle/p3turtle.cc +++ b/libretroshare/src/turtle/p3turtle.cc @@ -125,6 +125,7 @@ p3turtle::p3turtle(p3ServiceControl *sc,p3LinkMgr *lm) _traffic_info.reset() ; _max_tr_up_rate = MAX_TR_FORWARD_PER_SEC ; + _service_type = getServiceInfo().mServiceType ; } const std::string TURTLE_APP_NAME = "turtle"; @@ -919,7 +920,7 @@ void p3turtle::handleSearchRequest(RsTurtleSearchRequestItem *item) if(item->depth < TURTLE_MAX_SEARCH_DEPTH || random_bypass) { std::set onlineIds ; - mServiceControl->getPeersConnected(RS_SERVICE_TYPE_TURTLE, onlineIds); + mServiceControl->getPeersConnected(_service_type, onlineIds); #ifdef P3TURTLE_DEBUG std::cerr << " Looking for online peers" << std::endl ; #endif @@ -1482,7 +1483,7 @@ void p3turtle::handleTunnelRequest(RsTurtleOpenTunnelItem *item) if(item->depth < TURTLE_MAX_SEARCH_DEPTH || random_bypass) { std::set onlineIds ; - mServiceControl->getPeersConnected(RS_SERVICE_TYPE_TURTLE, onlineIds); + mServiceControl->getPeersConnected(_service_type, onlineIds); // for(std::set::iterator it(onlineIds.begin());it!=onlineIds.end();) // if(!mServiceControl->isPeerConnected(RS_SERVICE_PERM_TURTLE,*it)) @@ -1948,7 +1949,7 @@ void p3turtle::getTrafficStatistics(TurtleTrafficStatisticsInfo& info) const info.forward_probabilities.clear() ; std::set onlineIds ; - mServiceControl->getPeersConnected(RS_SERVICE_TYPE_TURTLE, onlineIds); + mServiceControl->getPeersConnected(_service_type, onlineIds); int nb_online_ids = onlineIds.size() ; diff --git a/libretroshare/src/turtle/p3turtle.h b/libretroshare/src/turtle/p3turtle.h index 290c6b498..ef6011a37 100644 --- a/libretroshare/src/turtle/p3turtle.h +++ b/libretroshare/src/turtle/p3turtle.h @@ -430,6 +430,10 @@ class p3turtle: public p3Service, public RsTurtle, public p3Config bool _turtle_routing_enabled ; bool _turtle_routing_session_enabled ; + // p3ServiceControl service type + + uint32_t _service_type ; + #ifdef P3TURTLE_DEBUG // debug function void dumpState() ;