Fix --rpc_ip and --rpc_port (RIPD-679)

This reverts commit 2b040569e7.
This commit is contained in:
Vinnie Falco
2015-04-24 17:27:06 -07:00
parent 9114f3d2e6
commit 98c915b2ca
5 changed files with 63 additions and 4 deletions

View File

@@ -1019,7 +1019,22 @@ int RPCCall::fromCommandLine (const std::vector<std::string>& vCmd)
}
else
{
auto const setup = setup_ServerHandler(getConfig(), std::cerr);
ServerHandler::Setup setup;
try
{
std::stringstream ss;
setup = setup_ServerHandler(getConfig(), ss);
}
catch(...)
{
// ignore any exceptions, so the command
// line client works without a config file
}
if (getConfig().rpc_ip)
setup.client.ip = getConfig().rpc_ip->to_string();
if (getConfig().rpc_port)
setup.client.port = *getConfig().rpc_port;
Json::Value jvParams (Json::arrayValue);