From 0f0fb266c7968e6239cfff7d24fec79864ca87d0 Mon Sep 17 00:00:00 2001 From: NeverExist Date: Sun, 27 Aug 2017 12:57:06 +0900 Subject: [PATCH] Fix deformed json result with an extra comma {"id":1,"result":{"i2p.router.net.bw.in":48,"i2p.router.net.bw.out":48,},"jsonrpc":"2.0"} You can see there is an extra comma behind the number 48. --- daemon/I2PControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/I2PControl.cpp b/daemon/I2PControl.cpp index 1d7023fb..3d06b97a 100644 --- a/daemon/I2PControl.cpp +++ b/daemon/I2PControl.cpp @@ -512,10 +512,10 @@ namespace client { for (auto it = params.begin (); it != params.end (); it++) { - if (it != params.begin ()) results << ","; LogPrint (eLogDebug, "I2PControl: NetworkSetting request: ", it->first); auto it1 = m_NetworkSettingHandlers.find (it->first); if (it1 != m_NetworkSettingHandlers.end ()) { + if (it != params.begin ()) results << ","; (this->*(it1->second))(it->second.data (), results); } else LogPrint (eLogError, "I2PControl: NetworkSetting unknown request: ", it->first);