diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 27e6f0a1..0befdcda 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -255,7 +255,7 @@ namespace util for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ()) { it.second->GetTunnelConfig ()->Print (s); - if (it.second->GetTunnelPool ()) + if (it.second->GetTunnelPool () && !it.second->GetTunnelPool ()->IsExploratory ()) s << " " << "Pool"; if (it.second->IsFailed ()) s << " " << "Failed"; diff --git a/Tunnel.cpp b/Tunnel.cpp index 334abee1..b85f05aa 100644 --- a/Tunnel.cpp +++ b/Tunnel.cpp @@ -167,7 +167,7 @@ namespace tunnel Tunnels tunnels; Tunnels::Tunnels (): m_IsRunning (false), m_IsTunnelCreated (false), - m_NextReplyMsgID (555),m_Thread (0) + m_NextReplyMsgID (555), m_Thread (nullptr), m_ExploratoryPool (nullptr) { } diff --git a/Tunnel.h b/Tunnel.h index 7fffd64d..4328ddb3 100644 --- a/Tunnel.h +++ b/Tunnel.h @@ -147,6 +147,7 @@ namespace tunnel std::list m_OutboundTunnels; std::map m_TransitTunnels; std::map m_Pools; + TunnelPool * m_ExploratoryPool; i2p::util::Queue m_Queue; public: diff --git a/TunnelPool.cpp b/TunnelPool.cpp index b7c22e2b..9b552101 100644 --- a/TunnelPool.cpp +++ b/TunnelPool.cpp @@ -3,7 +3,6 @@ #include "Tunnel.h" #include "NetDb.h" #include "Timestamp.h" -#include "RouterContext.h" #include "Garlic.h" #include "TunnelPool.h" diff --git a/TunnelPool.h b/TunnelPool.h index c780d9b7..bc71ae24 100644 --- a/TunnelPool.h +++ b/TunnelPool.h @@ -9,6 +9,7 @@ #include "LeaseSet.h" #include "I2NPProtocol.h" #include "TunnelBase.h" +#include "RouterContext.h" namespace i2p { @@ -27,7 +28,8 @@ namespace tunnel const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); }; const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); }; - + bool IsExploratory () const { return &m_LocalDestination == &i2p::context; }; + void CreateTunnels (); void TunnelCreated (InboundTunnel * createdTunnel); void TunnelExpired (InboundTunnel * expiredTunnel);