diff --git a/src/gxs/rsgxsnettunnel.cc b/src/gxs/rsgxsnettunnel.cc index 7d6eda58c..a85c1af83 100644 --- a/src/gxs/rsgxsnettunnel.cc +++ b/src/gxs/rsgxsnettunnel.cc @@ -1467,6 +1467,10 @@ void RsGxsNetTunnelService::getStatistics( bias = mRandomBias ; } +bool RsGxsNetTunnelService::isGXSHash(RsFileHash hash) const +{ + return mHandledHashes.find(hash) != mHandledHashes.end(); +} diff --git a/src/gxs/rsgxsnettunnel.h b/src/gxs/rsgxsnettunnel.h index 40f8303f6..bb128bdce 100644 --- a/src/gxs/rsgxsnettunnel.h +++ b/src/gxs/rsgxsnettunnel.h @@ -230,6 +230,8 @@ class RsGxsNetTunnelService: std::map& turtle_vpid_to_net_tunnel_vpid, Bias20Bytes& bias) const override ; + bool isGXSHash(RsFileHash hash) const; + RS_DEPRECATED TurtleRequestId turtleSearchRequest( const std::string& match_string, diff --git a/src/retroshare/rsgxsdistsync.h b/src/retroshare/rsgxsdistsync.h index d65027d58..542cc3d67 100644 --- a/src/retroshare/rsgxsdistsync.h +++ b/src/retroshare/rsgxsdistsync.h @@ -85,6 +85,7 @@ class RsGxsDistSync std::map& turtle_vpid_to_net_tunnel_vpid, Bias20Bytes& bias ) const =0; + virtual bool isGXSHash(RsFileHash hash) const =0; }; extern RsGxsDistSync *rsGxsDistSync ; diff --git a/src/turtle/p3turtle.cc b/src/turtle/p3turtle.cc index 6dbfeef87..426673f88 100644 --- a/src/turtle/p3turtle.cc +++ b/src/turtle/p3turtle.cc @@ -39,6 +39,7 @@ #include "pqi/authssl.h" #include "pqi/p3linkmgr.h" #include "retroshare/rspeers.h" +#include #include "ft/ftserver.h" #include "ft/ftdatamultiplex.h" @@ -2372,6 +2373,9 @@ void p3turtle::getInfo( std::vector >& hashes_info, for(std::map::const_iterator it(_incoming_file_hashes.begin());it!=_incoming_file_hashes.end();++it) { + if(rsGxsDistSync->isGXSHash(it->first)) + continue; + hashes_info.push_back(std::vector()) ; std::vector& hashes(hashes_info.back()) ; @@ -2387,6 +2391,9 @@ void p3turtle::getInfo( std::vector >& hashes_info, for(std::map::const_iterator it(_local_tunnels.begin());it!=_local_tunnels.end();++it) { + if(rsGxsDistSync->isGXSHash(it->second.hash)) + continue; + tunnels_info.push_back(std::vector()) ; std::vector& tunnel(tunnels_info.back()) ;