Browse Source

Merge pull request #3586

4412c5a Fix `getaddednodeinfo` RPC call with dns=false (Wladimir J. van der Laan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
3160a9b92d
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 10
      src/rpcnet.cpp

10
src/rpcnet.cpp

@ -255,16 +255,18 @@ Value getaddednodeinfo(const Array& params, bool fHelp)
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node has not been added."); throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node has not been added.");
} }
Array ret;
if (!fDns) if (!fDns)
{ {
Object ret;
BOOST_FOREACH(string& strAddNode, laddedNodes) BOOST_FOREACH(string& strAddNode, laddedNodes)
ret.push_back(Pair("addednode", strAddNode)); {
Object obj;
obj.push_back(Pair("addednode", strAddNode));
ret.push_back(obj);
}
return ret; return ret;
} }
Array ret;
list<pair<string, vector<CService> > > laddedAddreses(0); list<pair<string, vector<CService> > > laddedAddreses(0);
BOOST_FOREACH(string& strAddNode, laddedNodes) BOOST_FOREACH(string& strAddNode, laddedNodes)
{ {

Loading…
Cancel
Save