Skip to content
Snippets Groups Projects
Commit f9a07198 authored by Serguei Kolos's avatar Serguei Kolos
Browse files

Reshuffle command line parameter names

parent 997aa385
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,8 @@ int main(int ac, char **av) {
return 1;
}
std::string server_partition_name;
std::string partition_name;
std::string proxy_partition_name;
std::string plugin_name;
std::string proxy_name;
std::string server_name;
......@@ -62,11 +62,11 @@ int main(int ac, char **av) {
description.add_options()
("help,h", "produce help message")
("wait,w", "wait for the target server to be started")
("server-partition-name,r", value<std::string>(&server_partition_name)
->default_value(c_proxy_partition_default_value),
"partition name of the target server")
("partition-name,p", value<std::string>(&partition_name)
->default_value("initial"),
"partition name of the target server")
("proxy-partition-name,P", value<std::string>(&proxy_partition_name)
->default_value(c_proxy_partition_default_value),
"partition name of the proxy")
("plugin-name,l", value<std::string>(&plugin_name)->required(),
"short name of the proxy implementation library, e.g 'isproxy'")
......@@ -92,8 +92,8 @@ int main(int ac, char **av) {
wait_for_server = arguments.count("wait");
if (proxy_partition_name == c_proxy_partition_default_value) {
proxy_partition_name = partition_name;
if (server_partition_name == c_proxy_partition_default_value) {
server_partition_name = partition_name;
}
}
catch(std::exception& e) {
......@@ -103,20 +103,20 @@ int main(int ac, char **av) {
}
try {
IPCPartition partition(partition_name);
IPCPartition proxy_partition(proxy_partition_name);
IPCPartition server_partition(server_partition_name);
IPCPartition proxy_partition(partition_name);
if (proxy_partition.isObjectValid<
ipc::servant, ipc::use_cache, ipc::non_existent>(
proxy_name, type_name)) {
ers::fatal(ipc::ProxyAlreadyExists(ERS_HERE,
proxy_name, type_name, partition.name()));
proxy_name, type_name, server_partition.name()));
return 1;
}
while (true) {
try {
if (partition.isObjectValid<
if (server_partition.isObjectValid<
ipc::servant, ipc::use_cache, ipc::non_existent>(
server_name, type_name)) {
break;
......@@ -127,7 +127,7 @@ int main(int ac, char **av) {
if (not wait_for_server) {
ers::fatal(ipc::ServerNotFound(ERS_HERE,
server_name, type_name, partition.name()));
server_name, type_name, server_partition.name()));
return 1;
}
......@@ -135,7 +135,7 @@ int main(int ac, char **av) {
std::this_thread::sleep_for(1s);
}
ipc::servant_var s = partition.lookup<
ipc::servant_var s = server_partition.lookup<
ipc::servant, ipc::use_cache, ipc::non_existent>(
server_name, type_name);
......@@ -155,7 +155,7 @@ int main(int ac, char **av) {
ERS_LOG("Proxy server '" << proxy_name << "' of '" << interface_id
<< "' type has been started in '" << proxy_partition.name()
<< "' partition for '" << server_name
<< "' server belonging to '" << partition.name() << "' partition");
<< "' server belonging to '" << server_partition.name() << "' partition");
daq::ipc::signal::wait_for();
......
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