mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
Merge branch 'develop' of github.com:ripple/rippled into develop
This commit is contained in:
@@ -822,17 +822,6 @@
|
|||||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt8.cpp">
|
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt8.cpp">
|
||||||
<Filter>[1] Ripple\ripple_app</Filter>
|
<Filter>[1] Ripple\ripple_app</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt5.cpp">
|
|
||||||
<Filter>1. Modules\ripple_app</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt6.cpp">
|
|
||||||
<Filter>1. Modules\ripple_app</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt7.cpp">
|
|
||||||
<Filter>1. Modules\ripple_app</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt8.cpp">
|
|
||||||
<Filter>1. Modules\ripple_app</Filter>
|
|
||||||
<ClCompile Include="..\..\modules\ripple_basics\utility\ripple_LogFile.cpp">
|
<ClCompile Include="..\..\modules\ripple_basics\utility\ripple_LogFile.cpp">
|
||||||
<Filter>[1] Ripple\ripple_basics\utility</Filter>
|
<Filter>[1] Ripple\ripple_basics\utility</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|||||||
@@ -578,5 +578,23 @@ int Config::getSize (SizedItemName item)
|
|||||||
return -1;
|
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
|
|
||||||
|
|||||||
@@ -181,6 +181,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
int getRpcPort () const { return m_rpcPort; }
|
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 <ip-address>[':'<port-number>]
|
||||||
|
*/
|
||||||
|
void setRpcIpAndOptionalPort (std::string const& newAddress);
|
||||||
|
|
||||||
/** Set the client or server RPC IP.
|
/** Set the client or server RPC IP.
|
||||||
|
|
||||||
@note The string is not syntax-checked.
|
@note The string is not syntax-checked.
|
||||||
|
|||||||
@@ -57,10 +57,6 @@ void printHelp (const po::options_description& desc)
|
|||||||
|
|
||||||
cerr << desc << endl;
|
cerr << desc << endl;
|
||||||
|
|
||||||
cerr << "Options: " << endl;
|
|
||||||
cerr << " -rpc-ip=<ip-address>[':'<port-number>]" << endl;
|
|
||||||
cerr << " -rpc-port=<port-number>" << endl;
|
|
||||||
cerr << endl;
|
|
||||||
cerr << "Commands: " << endl;
|
cerr << "Commands: " << endl;
|
||||||
cerr << " account_info <account>|<nickname>|<seed>|<pass_phrase>|<key> [<ledger>] [strict]" << endl;
|
cerr << " account_info <account>|<nickname>|<seed>|<pass_phrase>|<key> [<ledger>] [strict]" << endl;
|
||||||
cerr << " account_lines <account> <account>|\"\" [<ledger>]" << endl;
|
cerr << " account_lines <account> <account>|\"\" [<ledger>]" << endl;
|
||||||
@@ -168,7 +164,7 @@ int rippleMain (int argc, char** argv)
|
|||||||
("help,h", "Display this message.")
|
("help,h", "Display this message.")
|
||||||
("conf", po::value<std::string> (), "Specify the configuration file.")
|
("conf", po::value<std::string> (), "Specify the configuration file.")
|
||||||
("rpc", "Perform rpc command (default).")
|
("rpc", "Perform rpc command (default).")
|
||||||
("rpc_ip", po::value <std::string> (), "Specify the IP address for RPC command.")
|
("rpc_ip", po::value <std::string> (), "Specify the IP address for RPC command. Format: <ip-address>[':'<port-number>]")
|
||||||
("rpc_port", po::value <int> (), "Specify the port number for RPC command.")
|
("rpc_port", po::value <int> (), "Specify the port number for RPC command.")
|
||||||
("standalone,a", "Run with no peers.")
|
("standalone,a", "Run with no peers.")
|
||||||
("testnet,t", "Run in test net mode.")
|
("testnet,t", "Run in test net mode.")
|
||||||
@@ -306,7 +302,7 @@ int rippleMain (int argc, char** argv)
|
|||||||
//
|
//
|
||||||
if (vm.count ("rpc_ip"))
|
if (vm.count ("rpc_ip"))
|
||||||
{
|
{
|
||||||
theConfig.setRpcIP (vm ["rpc_ip"].as <std::string> ());
|
theConfig.setRpcIpAndOptionalPort (vm ["rpc_ip"].as <std::string> ());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override the RPC destination port number
|
// Override the RPC destination port number
|
||||||
|
|||||||
Reference in New Issue
Block a user