mirror of
https://github.com/RetroShare/libretroshare.git
synced 2026-09-14 11:05:45 +05:00
router statistics - filter out gxs tunnels from file tunnels
This commit is contained in:
parent
32adb41794
commit
8f623bd2a6
@ -1467,6 +1467,10 @@ void RsGxsNetTunnelService::getStatistics(
|
||||
bias = mRandomBias ;
|
||||
}
|
||||
|
||||
bool RsGxsNetTunnelService::isGXSHash(RsFileHash hash) const
|
||||
{
|
||||
return mHandledHashes.find(hash) != mHandledHashes.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -230,6 +230,8 @@ public:
|
||||
std::map<TurtleVirtualPeerId,RsGxsNetTunnelVirtualPeerId>& turtle_vpid_to_net_tunnel_vpid,
|
||||
Bias20Bytes& bias) const override ;
|
||||
|
||||
bool isGXSHash(RsFileHash hash) const;
|
||||
|
||||
RS_DEPRECATED
|
||||
TurtleRequestId turtleSearchRequest(
|
||||
const std::string& match_string,
|
||||
|
||||
@ -85,6 +85,7 @@ class RsGxsDistSync
|
||||
std::map<TurtleVirtualPeerId,RsGxsNetTunnelVirtualPeerId>& turtle_vpid_to_net_tunnel_vpid,
|
||||
Bias20Bytes& bias
|
||||
) const =0;
|
||||
virtual bool isGXSHash(RsFileHash hash) const =0;
|
||||
};
|
||||
|
||||
extern RsGxsDistSync *rsGxsDistSync ;
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#include "pqi/authssl.h"
|
||||
#include "pqi/p3linkmgr.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include <retroshare/rsgxsdistsync.h>
|
||||
|
||||
#include "ft/ftserver.h"
|
||||
#include "ft/ftdatamultiplex.h"
|
||||
@ -2372,6 +2373,9 @@ void p3turtle::getInfo( std::vector<std::vector<std::string> >& hashes_info,
|
||||
|
||||
for(std::map<TurtleFileHash,TurtleHashInfo>::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::string>()) ;
|
||||
|
||||
std::vector<std::string>& hashes(hashes_info.back()) ;
|
||||
@ -2387,6 +2391,9 @@ void p3turtle::getInfo( std::vector<std::vector<std::string> >& hashes_info,
|
||||
|
||||
for(std::map<TurtleTunnelId,TurtleTunnel>::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::string>()) ;
|
||||
std::vector<std::string>& tunnel(tunnels_info.back()) ;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user