Skip to content
/ i2pd Public
forked from PurpleI2P/i2pd

Commit

Permalink
Fix deformed json result with an extra comma
Browse files Browse the repository at this point in the history
{"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.
  • Loading branch information
myfingerhurt authored Aug 27, 2017
1 parent 5c3d629 commit 0f0fb26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/I2PControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0f0fb26

Please sign in to comment.