From bd3e4ac11c0c0fd93e68835e5dd92daa79b6d4bf Mon Sep 17 00:00:00 2001 From: Nik Bougalis Date: Mon, 28 Sep 2015 14:32:57 -0700 Subject: [PATCH] Correctly parse the --rpc_port command line argument --- src/ripple/app/main/Main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ripple/app/main/Main.cpp b/src/ripple/app/main/Main.cpp index 683bb7438..fdc0a3d82 100644 --- a/src/ripple/app/main/Main.cpp +++ b/src/ripple/app/main/Main.cpp @@ -282,7 +282,7 @@ int run (int argc, char** argv) ("conf", po::value (), "Specify the configuration file.") ("rpc", "Perform rpc command (default).") ("rpc_ip", po::value (), "Specify the IP address for RPC command. Format: [':']") - ("rpc_port", po::value (), "Specify the port number for RPC command.") + ("rpc_port", po::value (), "Specify the port number for RPC command.") ("standalone,a", "Run with no peers.") ("shutdowntest", po::value ()->implicit_value (""), "Perform shutdown tests.") ("unittest,u", po::value ()->implicit_value (""), "Perform unit tests.") @@ -438,9 +438,9 @@ int run (int argc, char** argv) { try { - config->rpc_ip = + config->rpc_ip.emplace ( boost::asio::ip::address_v4::from_string( - vm["rpc_ip"].as()); + vm["rpc_ip"].as())); } catch(...) { @@ -456,7 +456,8 @@ int run (int argc, char** argv) { try { - config->rpc_port = vm["rpc_port"].as(); + config->rpc_port.emplace ( + vm["rpc_port"].as()); if (*config->rpc_port == 0) throw std::domain_error ("");