From 2366cbc83371b47e72e0579b3679ccc42d44affc Mon Sep 17 00:00:00 2001 From: R4SAS Date: Mon, 1 Oct 2018 18:11:17 +0300 Subject: [PATCH] count outgoing tags --- daemon/HTTPServer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 09b00707..b4c3f79b 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -381,10 +381,12 @@ namespace http { s << "
\r\n"; s << "Tags
Incoming: " << dest->GetNumIncomingTags () << "
"; if (!dest->GetSessions ().empty ()) { - s << "
\r\n\r\n

\r\n"; - for (const auto& it: dest->GetSessions ()) - s << i2p::client::context.GetAddressBook ().ToAddress(it.first) << " " << it.second->GetNumOutgoingTags () << "
\r\n"; - s << "

\r\n
\r\n"; + 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 (); + } + s << "
\r\n\r\n

\r\n" << tmp_s.str () << "

\r\n
\r\n"; } else s << "Outgoing: 0
\r\n"; s << "
\r\n";