mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
[webconsole] remove version from title, move tunnel chain print from Tunnel class
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
9b4e8bf64b
commit
c9e4e78f41
3 changed files with 79 additions and 67 deletions
|
@ -235,15 +235,11 @@ namespace tunnel
|
|||
m_State = state;
|
||||
}
|
||||
|
||||
|
||||
void Tunnel::PrintHops (std::stringstream& s) const
|
||||
void Tunnel::VisitTunnelHops(TunnelHopVisitor v)
|
||||
{
|
||||
// hops are in inverted order, we must print in direct order
|
||||
// hops are in inverted order, we must return in direct order
|
||||
for (auto it = m_Hops.rbegin (); it != m_Hops.rend (); it++)
|
||||
{
|
||||
s << " ⇒ ";
|
||||
s << i2p::data::GetIdentHashAbbreviation ((*it).ident->GetIdentHash ());
|
||||
}
|
||||
v((*it).ident);
|
||||
}
|
||||
|
||||
void InboundTunnel::HandleTunnelDataMsg (std::shared_ptr<I2NPMessage>&& msg)
|
||||
|
@ -254,12 +250,6 @@ namespace tunnel
|
|||
m_Endpoint.HandleDecryptedTunnelDataMsg (msg);
|
||||
}
|
||||
|
||||
void InboundTunnel::Print (std::stringstream& s) const
|
||||
{
|
||||
PrintHops (s);
|
||||
s << " ⇒ " << GetTunnelID () << ":me";
|
||||
}
|
||||
|
||||
ZeroHopsInboundTunnel::ZeroHopsInboundTunnel ():
|
||||
InboundTunnel (std::make_shared<ZeroHopsTunnelConfig> ()),
|
||||
m_NumReceivedBytes (0)
|
||||
|
@ -276,11 +266,6 @@ namespace tunnel
|
|||
}
|
||||
}
|
||||
|
||||
void ZeroHopsInboundTunnel::Print (std::stringstream& s) const
|
||||
{
|
||||
s << " ⇒ " << GetTunnelID () << ":me";
|
||||
}
|
||||
|
||||
void OutboundTunnel::SendTunnelDataMsg (const uint8_t * gwHash, uint32_t gwTunnel, std::shared_ptr<i2p::I2NPMessage> msg)
|
||||
{
|
||||
TunnelMessageBlock block;
|
||||
|
@ -315,13 +300,6 @@ namespace tunnel
|
|||
LogPrint (eLogError, "Tunnel: Incoming message for outbound tunnel ", GetTunnelID ());
|
||||
}
|
||||
|
||||
void OutboundTunnel::Print (std::stringstream& s) const
|
||||
{
|
||||
s << GetTunnelID () << ":me";
|
||||
PrintHops (s);
|
||||
s << " ⇒ ";
|
||||
}
|
||||
|
||||
ZeroHopsOutboundTunnel::ZeroHopsOutboundTunnel ():
|
||||
OutboundTunnel (std::make_shared<ZeroHopsTunnelConfig> ()),
|
||||
m_NumSentBytes (0)
|
||||
|
@ -351,11 +329,6 @@ namespace tunnel
|
|||
}
|
||||
}
|
||||
|
||||
void ZeroHopsOutboundTunnel::Print (std::stringstream& s) const
|
||||
{
|
||||
s << GetTunnelID () << ":me ⇒ ";
|
||||
}
|
||||
|
||||
Tunnels tunnels;
|
||||
|
||||
Tunnels::Tunnels (): m_IsRunning (false), m_Thread (nullptr),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue