diff --git a/Builds/VisualStudio2012/RippleD.vcxproj.filters b/Builds/VisualStudio2012/RippleD.vcxproj.filters
index 71cc6b8f6..7c2bd2c13 100644
--- a/Builds/VisualStudio2012/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2012/RippleD.vcxproj.filters
@@ -822,17 +822,6 @@
[1] Ripple\ripple_app
-
- 1. Modules\ripple_app
-
-
- 1. Modules\ripple_app
-
-
- 1. Modules\ripple_app
-
-
- 1. Modules\ripple_app
[1] Ripple\ripple_basics\utility
diff --git a/modules/ripple_core/functional/ripple_Config.cpp b/modules/ripple_core/functional/ripple_Config.cpp
index 568f708ed..741c52890 100644
--- a/modules/ripple_core/functional/ripple_Config.cpp
+++ b/modules/ripple_core/functional/ripple_Config.cpp
@@ -578,5 +578,23 @@ int Config::getSize (SizedItemName item)
return -1;
}
+void Config::setRpcIpAndOptionalPort (std::string const& newAddress)
+{
+ String const s (newAddress.c_str ());
+
+ int const colonPosition = s.lastIndexOfChar (':');
+
+ if (colonPosition != -1)
+ {
+ String const ipPart = s.substring (0, colonPosition);
+ String const portPart = s.substring (colonPosition + 1, s.length ());
+
+ setRpcIP (ipPart.toRawUTF8 ());
+ setRpcPort (portPart.getIntValue ());
+ }
+ else
+ {
+ setRpcIP (newAddress);
+ }
+}
-// vim:ts=4
diff --git a/modules/ripple_core/functional/ripple_Config.h b/modules/ripple_core/functional/ripple_Config.h
index 8fee07eaa..0d9b3c1c5 100644
--- a/modules/ripple_core/functional/ripple_Config.h
+++ b/modules/ripple_core/functional/ripple_Config.h
@@ -181,6 +181,14 @@ public:
*/
int getRpcPort () const { return m_rpcPort; }
+ /** Set the client or server RPC IP and optional port.
+
+ @note The string is not syntax checked.
+
+ @param newAddress A string in the format [':']
+ */
+ void setRpcIpAndOptionalPort (std::string const& newAddress);
+
/** Set the client or server RPC IP.
@note The string is not syntax-checked.
diff --git a/src/cpp/ripple/ripple_Main.cpp b/src/cpp/ripple/ripple_Main.cpp
index 23b2f619c..21c5d8b59 100644
--- a/src/cpp/ripple/ripple_Main.cpp
+++ b/src/cpp/ripple/ripple_Main.cpp
@@ -57,10 +57,6 @@ void printHelp (const po::options_description& desc)
cerr << desc << endl;
- cerr << "Options: " << endl;
- cerr << " -rpc-ip=[':']" << endl;
- cerr << " -rpc-port=" << endl;
- cerr << endl;
cerr << "Commands: " << endl;
cerr << " account_info |||| [] [strict]" << endl;
cerr << " account_lines |\"\" []" << endl;
@@ -168,7 +164,7 @@ int rippleMain (int argc, char** argv)
("help,h", "Display this message.")
("conf", po::value (), "Specify the configuration file.")
("rpc", "Perform rpc command (default).")
- ("rpc_ip", po::value (), "Specify the IP address for RPC command.")
+ ("rpc_ip", po::value (), "Specify the IP address for RPC command. Format: [':']")
("rpc_port", po::value (), "Specify the port number for RPC command.")
("standalone,a", "Run with no peers.")
("testnet,t", "Run in test net mode.")
@@ -306,7 +302,7 @@ int rippleMain (int argc, char** argv)
//
if (vm.count ("rpc_ip"))
{
- theConfig.setRpcIP (vm ["rpc_ip"].as ());
+ theConfig.setRpcIpAndOptionalPort (vm ["rpc_ip"].as ());
}
// Override the RPC destination port number