From 99d099a4261db9cd2aaa829e9e01add0d24c55ff Mon Sep 17 00:00:00 2001 From: PobreGato <315121269+pobregat0@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:50:31 +0300 Subject: [PATCH] don't put leading comma in ClientServicesInfo reply --- daemon/I2PControlHandlers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/I2PControlHandlers.cpp b/daemon/I2PControlHandlers.cpp index a04fb930..c62f83cc 100644 --- a/daemon/I2PControlHandlers.cpp +++ b/daemon/I2PControlHandlers.cpp @@ -308,13 +308,15 @@ namespace client void I2PControlHandlers::ClientServicesInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results) { + bool first = true; for (auto it = params.begin (); it != params.end (); it++) { LogPrint (eLogDebug, "I2PControl: ClientServicesInfo request: ", it->first); auto it1 = m_ClientServicesInfoHandlers.find (it->first); if (it1 != m_ClientServicesInfoHandlers.end ()) { - if (it != params.begin ()) results << ","; + if (!first) results << ","; + else first = false; (this->*(it1->second))(results); } else