diff --git a/Destination.cpp b/Destination.cpp index c53c4ee6..5893caff 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -780,5 +780,19 @@ namespace client } LogPrint(eLogError, "Destinations: Can't save keys to ", path); } + + std::vector > ClientDestination::GetAllStreams () const + { + std::vector > ret; + if (m_StreamingDestination) + { + for (auto& it: m_StreamingDestination->GetStreams ()) + ret.push_back (it.second); + } + for (auto& it: m_StreamingDestinationsByPorts) + for (auto& it1: it.second->GetStreams ()) + ret.push_back (it1.second); + return ret; + } } } diff --git a/Destination.h b/Destination.h index 44cb7424..3011b4cb 100644 --- a/Destination.h +++ b/Destination.h @@ -159,6 +159,7 @@ namespace client // for HTTP only int GetNumRemoteLeaseSets () const { return m_RemoteLeaseSets.size (); }; + std::vector > GetAllStreams () const; }; } } diff --git a/HTTPServer.cpp b/HTTPServer.cpp index f7efcba9..8db9d330 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -609,19 +609,19 @@ namespace util s << "Status"; s << ""; - for (auto it: dest->GetStreamingDestination ()->GetStreams ()) + for (auto it: dest->GetAllStreams ()) { s << ""; - s << "" << it.first << ""; - s << "" << i2p::client::context.GetAddressBook ().ToAddress(it.second->GetRemoteIdentity ()) << ""; - s << "" << it.second->GetNumSentBytes () << ""; - s << "" << it.second->GetNumReceivedBytes () << ""; - s << "" << it.second->GetSendQueueSize () << ""; - s << "" << it.second->GetReceiveQueueSize () << ""; - s << "" << it.second->GetSendBufferSize () << ""; - s << "" << it.second->GetRTT () << ""; - s << "" << it.second->GetWindowSize () << ""; - s << "" << (int)it.second->GetStatus () << ""; + s << "" << it->GetSendStreamID () << ""; + s << "" << i2p::client::context.GetAddressBook ().ToAddress(it->GetRemoteIdentity ()) << ""; + s << "" << it->GetNumSentBytes () << ""; + s << "" << it->GetNumReceivedBytes () << ""; + s << "" << it->GetSendQueueSize () << ""; + s << "" << it->GetReceiveQueueSize () << ""; + s << "" << it->GetSendBufferSize () << ""; + s << "" << it->GetRTT () << ""; + s << "" << it->GetWindowSize () << ""; + s << "" << (int)it->GetStatus () << ""; s << "
\r\n" << std::endl; } }