Skip to content
Snippets Groups Projects
Commit 72ff3421 authored by Ramin Yaghoubzadeh Torky's avatar Ramin Yaghoubzadeh Torky
Browse files

C++: renamed new options to --rsb-spread-host and --rsb-spread-port

parent 4f64e285
No related branches found
No related tags found
No related merge requests found
...@@ -210,9 +210,9 @@ IPAACA_MEMBER_VAR_EXPORT extern std::string __ipaaca_static_option_default_chann ...@@ -210,9 +210,9 @@ IPAACA_MEMBER_VAR_EXPORT extern std::string __ipaaca_static_option_default_chann
IPAACA_MEMBER_VAR_EXPORT extern unsigned int __ipaaca_static_option_log_level; IPAACA_MEMBER_VAR_EXPORT extern unsigned int __ipaaca_static_option_log_level;
/// RSB host to connect to (defaults to "" = do not set, use global config) /// RSB host to connect to (defaults to "" = do not set, use global config)
IPAACA_MEMBER_VAR_EXPORT extern std::string __ipaaca_static_option_rsb_host; IPAACA_MEMBER_VAR_EXPORT extern std::string __ipaaca_static_option_rsb_spread_host;
/// RSB port to connect to (defaults to "" = do not set, use global config) /// RSB port to connect to (defaults to "" = do not set, use global config)
IPAACA_MEMBER_VAR_EXPORT extern std::string __ipaaca_static_option_rsb_port; IPAACA_MEMBER_VAR_EXPORT extern std::string __ipaaca_static_option_rsb_spread_port;
IPAACA_MEMBER_VAR_EXPORT Lock& logger_lock(); IPAACA_MEMBER_VAR_EXPORT Lock& logger_lock();
......
...@@ -90,8 +90,8 @@ void CommandLineParser::initialize_parser_defaults() ...@@ -90,8 +90,8 @@ void CommandLineParser::initialize_parser_defaults()
add_option("ipaaca-default-channel", 0, true, "default"); add_option("ipaaca-default-channel", 0, true, "default");
add_option("ipaaca-enable-logging", 0, true, "WARNING"); add_option("ipaaca-enable-logging", 0, true, "WARNING");
add_option("rsb-enable-logging", 0, true, "ERROR"); add_option("rsb-enable-logging", 0, true, "ERROR");
add_option("rsb-host", 0, true, ""); // empty = don't set add_option("rsb-spread-host", 0, true, ""); // empty = don't set
add_option("rsb-port", 0, true, ""); // empty = don't set add_option("rsb-spread-port", 0, true, ""); // empty = don't set
} }
} }
...@@ -110,14 +110,14 @@ bool CommandLineParser::consume_library_option(const std::string& name, bool exp ...@@ -110,14 +110,14 @@ bool CommandLineParser::consume_library_option(const std::string& name, bool exp
std::string newch = optarg; std::string newch = optarg;
IPAACA_DEBUG("Setting default channel " << newch) IPAACA_DEBUG("Setting default channel " << newch)
__ipaaca_static_option_default_channel = newch; __ipaaca_static_option_default_channel = newch;
} else if (name=="rsb-host") { } else if (name=="rsb-spread-host") {
std::string newhost = optarg; std::string newhost = optarg;
IPAACA_DEBUG("Setting RSB host " << newhost) IPAACA_DEBUG("Setting RSB Spread host " << newhost)
__ipaaca_static_option_rsb_host = newhost; __ipaaca_static_option_rsb_spread_host = newhost;
} else if (name=="rsb-port") { } else if (name=="rsb-spread-port") {
std::string newport = optarg; std::string newport = optarg;
IPAACA_DEBUG("Setting RSB port " << newport) IPAACA_DEBUG("Setting RSB Spread port " << newport)
__ipaaca_static_option_rsb_port = newport; __ipaaca_static_option_rsb_spread_port = newport;
} else if (name=="ipaaca-enable-logging") { } else if (name=="ipaaca-enable-logging") {
std::string level(optarg); std::string level(optarg);
if ((level=="NONE") || (level=="SILENT")) { if ((level=="NONE") || (level=="SILENT")) {
......
...@@ -98,13 +98,13 @@ IPAACA_EXPORT void Initializer::dump_current_default_config()//{{{ ...@@ -98,13 +98,13 @@ IPAACA_EXPORT void Initializer::dump_current_default_config()//{{{
IPAACA_EXPORT void Initializer::auto_configure_rsb()//{{{ IPAACA_EXPORT void Initializer::auto_configure_rsb()//{{{
{ {
// set RSB host and port iff provided using cmdline arguments // set RSB host and port iff provided using cmdline arguments
if (__ipaaca_static_option_rsb_host!="") { if (__ipaaca_static_option_rsb_spread_host!="") {
IPAACA_INFO("Overriding RSB host with " << __ipaaca_static_option_rsb_host) IPAACA_INFO("Overriding RSB Spread host with " << __ipaaca_static_option_rsb_spread_host)
setenv("RSB_TRANSPORT_SPREAD_HOST", __ipaaca_static_option_rsb_host.c_str(), 1); setenv("RSB_TRANSPORT_SPREAD_HOST", __ipaaca_static_option_rsb_spread_host.c_str(), 1);
} }
if (__ipaaca_static_option_rsb_port!="") { if (__ipaaca_static_option_rsb_spread_port!="") {
IPAACA_INFO("Overriding RSB port with " << __ipaaca_static_option_rsb_port) IPAACA_INFO("Overriding RSB Spread port with " << __ipaaca_static_option_rsb_spread_port)
setenv("RSB_TRANSPORT_SPREAD_PORT", __ipaaca_static_option_rsb_port.c_str(), 1); setenv("RSB_TRANSPORT_SPREAD_PORT", __ipaaca_static_option_rsb_spread_port.c_str(), 1);
} }
const char* plugin_path = getenv("RSB_PLUGINS_CPP_PATH"); const char* plugin_path = getenv("RSB_PLUGINS_CPP_PATH");
......
...@@ -76,8 +76,8 @@ IPAACA_EXPORT std::string __ipaaca_static_option_default_payload_type("JSON"); ...@@ -76,8 +76,8 @@ IPAACA_EXPORT std::string __ipaaca_static_option_default_payload_type("JSON");
IPAACA_EXPORT std::string __ipaaca_static_option_default_channel("default"); IPAACA_EXPORT std::string __ipaaca_static_option_default_channel("default");
IPAACA_EXPORT unsigned int __ipaaca_static_option_log_level(IPAACA_LOG_LEVEL_WARNING); IPAACA_EXPORT unsigned int __ipaaca_static_option_log_level(IPAACA_LOG_LEVEL_WARNING);
IPAACA_EXPORT std::string __ipaaca_static_option_rsb_host(""); IPAACA_EXPORT std::string __ipaaca_static_option_rsb_spread_host("");
IPAACA_EXPORT std::string __ipaaca_static_option_rsb_port(""); IPAACA_EXPORT std::string __ipaaca_static_option_rsb_spread_port("");
} // of namespace ipaaca } // of namespace ipaaca
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment