diff --git a/HTTPServer.cpp b/HTTPServer.cpp index f4cd7b82..157019de 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -800,7 +800,7 @@ namespace util for (auto it: i2p::tunnel::tunnels.GetOutboundTunnels ()) { - it->Print (s); + it->GetTunnelConfig ()->Print (s); auto state = it->GetState (); if (state == i2p::tunnel::eTunnelStateFailed) s << " " << "Failed"; @@ -812,7 +812,7 @@ namespace util for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ()) { - it.second->Print (s); + it.second->GetTunnelConfig ()->Print (s); auto state = it.second->GetState (); if (state == i2p::tunnel::eTunnelStateFailed) s << " " << "Failed"; @@ -863,7 +863,7 @@ namespace util s << "Tunnels:
"; for (auto it: pool->GetOutboundTunnels ()) { - it->Print (s); + it->GetTunnelConfig ()->Print (s); auto state = it->GetState (); if (state == i2p::tunnel::eTunnelStateFailed) s << " " << "Failed"; @@ -873,7 +873,7 @@ namespace util } for (auto it: pool->GetInboundTunnels ()) { - it->Print (s); + it->GetTunnelConfig ()->Print (s); auto state = it->GetState (); if (state == i2p::tunnel::eTunnelStateFailed) s << " " << "Failed"; diff --git a/Tunnel.cpp b/Tunnel.cpp index b899fdf7..e636712e 100644 --- a/Tunnel.cpp +++ b/Tunnel.cpp @@ -190,13 +190,6 @@ namespace tunnel newMsg->from = shared_from_this (); m_Endpoint.HandleDecryptedTunnelDataMsg (newMsg); } - - void InboundTunnel::Print (std::stringstream& s) const - { - s << "-->" << i2p::data::GetIdentHashAbbreviation (GetNextIdentHash ()) << ":" << GetNextTunnelID (); - s << "-->" << (GetNumHops () - 1) << " hops "; - s << GetTunnelID () << ":me"; - } void OutboundTunnel::SendTunnelDataMsg (const uint8_t * gwHash, uint32_t gwTunnel, std::shared_ptr msg) { @@ -232,12 +225,6 @@ namespace tunnel { LogPrint (eLogError, "Incoming message for outbound tunnel ", GetTunnelID ()); } - - void OutboundTunnel::Print (std::stringstream& s) const - { - s << "me-->" << i2p::data::GetIdentHashAbbreviation (GetNextIdentHash ()) << ":" << GetNextTunnelID (); - s << "-->" << (GetNumHops () - 1) << " hops-->"; - } Tunnels tunnels; diff --git a/Tunnel.h b/Tunnel.h index 20e02c1b..3c01eb00 100644 --- a/Tunnel.h +++ b/Tunnel.h @@ -97,7 +97,6 @@ namespace tunnel void SendTunnelDataMsg (const std::vector& msgs); // multiple messages const i2p::data::IdentHash& GetEndpointIdentHash () const { return m_EndpointIdentHash; }; size_t GetNumSentBytes () const { return m_Gateway.GetNumSentBytes (); }; - void Print (std::stringstream& s) const; // implements TunnelBase void HandleTunnelDataMsg (std::shared_ptr tunnelMsg); @@ -116,7 +115,6 @@ namespace tunnel InboundTunnel (std::shared_ptr config): Tunnel (config), m_Endpoint (true) {}; void HandleTunnelDataMsg (std::shared_ptr msg); size_t GetNumReceivedBytes () const { return m_Endpoint.GetNumReceivedBytes (); }; - void Print (std::stringstream& s) const; private: