Browse Source

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.
pull/933/head
NeverExist 7 years ago committed by GitHub
parent
commit
0f0fb266c7
  1. 2
      daemon/I2PControl.cpp

2
daemon/I2PControl.cpp

@ -512,10 +512,10 @@ namespace client @@ -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);

Loading…
Cancel
Save