diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/daemon/I2PControl.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/daemon/I2PControl.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/daemon/I2PControl.cpp 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/daemon/I2PControl.cpp 2026-08-17 00:28:57.000000000 +0000 @@ -91,5 +91,4 @@ m_MethodHandlers["NetworkSetting"] = &I2PControlHandlers::NetworkSettingHandler; m_MethodHandlers["ClientServicesInfo"] = &I2PControlHandlers::ClientServicesInfoHandler; - m_MethodHandlers["LocalDestinationInfo"] = &I2PControlHandlers::LocalDestinationInfoHandler; // I2PControl diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/daemon/I2PControlHandlers.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/daemon/I2PControlHandlers.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/daemon/I2PControlHandlers.cpp 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/daemon/I2PControlHandlers.cpp 2026-08-17 00:28:57.000000000 +0000 @@ -101,51 +101,4 @@ } -// LocalDestinationInfo - - void I2PControlHandlers::LocalDestinationInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results) - { - auto& addressBook = i2p::client::context.GetAddressBook (); - auto addr = addressBook.GetAddress (params.get ("destination", "")); - auto dest = addr && addr->IsIdentHash () ? - i2p::client::context.FindLocalDestination (addr->identHash) : nullptr; - if (!dest) - { - InsertParam (results, "error", std::string ("destination not found")); - return; - } - InsertParam (results, "destination", addressBook.ToAddress (dest->GetIdentHash ())); - - // arrays are written by hand: write_json makes an array only below the root - results << ",\"leasesets\":["; - bool first = true; - for (const auto& it: dest->GetLeaseSetsList ()) - { - if (!it) continue; - boost::property_tree::ptree ls; - ls.put ("address", addressBook.ToAddress (it->GetIdentHash ())); - ls.put ("type", (int)it->GetStoreType ()); - ls.put ("encType", (int)it->GetEncryptionType ()); - if (!first) results << ","; - first = false; - boost::property_tree::write_json (results, ls, false); - } - results << "],\"streams\":["; - first = true; - for (const auto& it: dest->GetAllStreams ()) - { - if (!it) continue; - auto identity = it->GetRemoteIdentity (); - boost::property_tree::ptree st; - st.put ("id", it->GetRecvStreamID ()); - st.put ("destination", identity ? addressBook.ToAddress (identity->GetIdentHash ()) : ""); - st.put ("sent", it->GetNumSentBytes ()); - st.put ("received", it->GetNumReceivedBytes ()); - if (!first) results << ","; - first = false; - boost::property_tree::write_json (results, st, false); - } - results << "]"; - } - // RouterInfo diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/daemon/I2PControlHandlers.h /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/daemon/I2PControlHandlers.h --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/daemon/I2PControlHandlers.h 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/daemon/I2PControlHandlers.h 2026-08-17 00:28:57.000000000 +0000 @@ -30,5 +30,4 @@ void NetworkSettingHandler (const boost::property_tree::ptree& params, std::ostringstream& results); void ClientServicesInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results); - void LocalDestinationInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results); protected: diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.cpp 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.cpp 2026-08-17 00:28:57.000000000 +0000 @@ -1448,10 +1448,11 @@ std::vector > ret; if (m_StreamingDestination) - ret = m_StreamingDestination->GetStreamsList (); - for (auto& it: m_StreamingDestinationsByPorts) { - auto streams = it.second->GetStreamsList (); - ret.insert (ret.end (), streams.begin (), streams.end ()); + 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 -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.h /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.h --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.h 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.h 2026-08-17 00:28:57.000000000 +0000 @@ -13,5 +13,4 @@ #include #include -#include #include #include @@ -237,14 +236,4 @@ int GetNumRemoteLeaseSets () const { return m_RemoteLeaseSets.size (); }; const decltype(m_RemoteLeaseSets)& GetLeaseSets () const { return m_RemoteLeaseSets; }; - // copy for other threads, unlike GetLeaseSets which hands out the container itself - std::vector > GetLeaseSetsList () const - { - std::lock_guard lock(m_RemoteLeaseSetsMutex); - std::vector > leaseSets; - leaseSets.reserve (m_RemoteLeaseSets.size ()); - for (const auto& it: m_RemoteLeaseSets) - leaseSets.push_back (it.second); - return leaseSets; - } bool IsEncryptedLeaseSet () const { return m_LeaseSetType == i2p::data::NETDB_STORE_TYPE_ENCRYPTED_LEASESET2; }; bool IsPerClientAuth () const { return m_AuthType > 0; }; diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Streaming.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Streaming.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Streaming.cpp 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Streaming.cpp 2026-08-17 00:28:57.000000000 +0000 @@ -2163,5 +2163,5 @@ m_PendingIncomingStreams.clear (); { - std::lock_guard l(m_StreamsMutex); + std::unique_lock l(m_StreamsMutex); for (auto it: m_Streams) it.second->Terminate (false); // we delete here @@ -2327,5 +2327,5 @@ { auto s = std::make_shared (m_Owner->GetService (), *this, remote, port); - std::lock_guard l(m_StreamsMutex); + std::unique_lock l(m_StreamsMutex); m_Streams.emplace (s->GetRecvStreamID (), s); return s; @@ -2341,5 +2341,5 @@ { auto s = std::make_shared (m_Owner->GetService (), *this); - std::lock_guard l(m_StreamsMutex); + std::unique_lock l(m_StreamsMutex); m_Streams.emplace (s->GetRecvStreamID (), s); m_IncomingStreams.emplace (receiveStreamID, s); @@ -2351,5 +2351,5 @@ if (stream) { - std::lock_guard l(m_StreamsMutex); + std::unique_lock l(m_StreamsMutex); m_Streams.erase (stream->GetRecvStreamID ()); if (stream->IsIncoming ()) @@ -2376,13 +2376,4 @@ } - std::vector > StreamingDestination::GetStreamsList () - { - std::vector > streams; - std::lock_guard l(m_StreamsMutex); - for (const auto& it: m_Streams) - streams.push_back (it.second); - return streams; - } - bool StreamingDestination::DeleteStream (uint32_t recvStreamID) { diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Streaming.h /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Streaming.h --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Streaming.h 2026-08-17 00:46:52.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Streaming.h 2026-08-17 00:28:57.000000000 +0000 @@ -15,5 +15,4 @@ #include #include -#include #include #include @@ -393,7 +392,4 @@ // for HTTP only const decltype(m_Streams)& GetStreams () const { return m_Streams; }; - - // copy for other threads, unlike GetStreams which hands out the map itself - std::vector > GetStreamsList (); };