aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-29 14:46:59 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-29 14:47:06 +0100
commit3160a9b92df5fe66d9b07b4934fca99dad5f2c5a (patch)
treea2b67764a4f7cbdddc5eb6412a6633a3148b6b07
parente16ee005ec7ed97c41ef1ebb6270b2c8dd6fb178 (diff)
parent4412c5a759affdcdb8c9c81b64465979aaba147a (diff)
Merge pull request #3586
4412c5a Fix `getaddednodeinfo` RPC call with dns=false (Wladimir J. van der Laan)
-rw-r--r--src/rpcnet.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 06ae7070c3..a3b37aa9e5 100644
--- a/src/rpcnet.cpp
+++ b/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.");
}
+ Array ret;
if (!fDns)
{
- Object ret;
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;
}
- Array ret;
-
list<pair<string, vector<CService> > > laddedAddreses(0);
BOOST_FOREACH(string& strAddNode, laddedNodes)
{