diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index bc1eccd5..8b0323ce 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -399,28 +399,36 @@ namespace http { } } s << "
\r\n"; - s << "Tags
Incoming: " << dest->GetNumIncomingTags () << "
"; + + s << "Tags
\r\nIncoming: " << dest->GetNumIncomingTags () << "
\r\n"; if (!dest->GetSessions ().empty ()) { std::stringstream tmp_s; uint32_t out_tags = 0; for (const auto& it: dest->GetSessions ()) { tmp_s << "" << i2p::client::context.GetAddressBook ().ToAddress(it.first) << "" << it.second->GetNumOutgoingTags () << "\r\n"; - out_tags = out_tags + it.second->GetNumOutgoingTags (); + out_tags += it.second->GetNumOutgoingTags (); } s << "
\r\n\r\n" << "
\r\n\r\n" << tmp_s.str () << "
DestinationAmount
\r\n
\r\n
\r\n"; } else s << "Outgoing: 0
\r\n"; - auto numECIESx25519Tags = dest->GetNumIncomingECIESx25519Tags (); - if (numECIESx25519Tags > 0) - s << "Incoming ECIESx25519: " << numECIESx25519Tags << "
"; - if (!dest->GetECIESx25519Sessions ().empty ()) - { - s << "
\r\nECIESx25519Tags sessions
"; - for (const auto& it: dest->GetECIESx25519Sessions ()) - s << i2p::client::context.GetAddressBook ().ToAddress(it.second->GetDestination ()) - << " " << it.second->GetState () << "
\r\n"; - } s << "
\r\n"; + + auto numECIESx25519Tags = dest->GetNumIncomingECIESx25519Tags (); + if (numECIESx25519Tags > 0) { + s << "ECIESx25519
\r\nIncoming Tags: " << numECIESx25519Tags << "
\r\n"; + if (!dest->GetECIESx25519Sessions ().empty ()) + { + std::stringstream tmp_s; uint32_t ecies_sessions = 0; + for (const auto& it: dest->GetECIESx25519Sessions ()) { + tmp_s << "" << i2p::client::context.GetAddressBook ().ToAddress(it.second->GetDestination ()) << "" << it.second->GetState () << "\r\n"; + ecies_sessions++; + } + s << "
\r\n\r\n" + << "
\r\n\r\n" << tmp_s.str () << "
DestinationStatus
\r\n
\r\n
\r\n"; + } else + s << "Tags sessions: 0
\r\n"; + s << "
\r\n"; + } } void ShowLocalDestination (std::stringstream& s, const std::string& b32, uint32_t token)