summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
diff options
context:
space:
mode:
authorPhil Mesnier <mesnierp@ociweb.com>2015-11-20 14:06:33 -0600
committerPhil Mesnier <mesnierp@ociweb.com>2015-11-20 14:06:33 -0600
commit2f093aa99c866dbbb63708a63539739913b55b9e (patch)
tree1af33efe6b63f23b7c2e71edfd35b6eab272116e /TAO/orbsvcs
parent19e9ff24881b62a1fe334c47f6da72316f20e8da (diff)
downloadATCD-2f093aa99c866dbbb63708a63539739913b55b9e.tar.gz
Fix the order of the command line arguments to be consistent with the rest of the tao_imr commands.
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp8
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/kill_server/run_test.pl12
2 files changed, 9 insertions, 11 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp
index 3e48efd1e3c..c5eaa18069f 100644
--- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp
@@ -612,7 +612,7 @@ TAO_IMR_Op_Remove::print_usage (void)
{
ORBSVCS_ERROR ((LM_ERROR, "Removes a server entry\n"
"\n"
- "Usage: tao_imr [options] remove [-f [-s <signum>]] <name>\n"
+ "Usage: tao_imr [options] remove <name> [-f [-s <signum>]]\n"
" where [options] are ORB options\n"
" -f forces shutdown or kill of a running server"
" -s specifies a signal for killing the server, if it is 0, a shutdown will be used"
@@ -631,10 +631,11 @@ TAO_IMR_Op_Remove::parse (int argc, ACE_TCHAR **argv)
}
this->force_ = false;
this->signum_ = 0;
- int server_arg = 1;
+
// Skip both the program name and the "remove" command
ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("hfs:"));
+ this->server_name_ = ACE_TEXT_ALWAYS_CHAR(argv[1]);
int c;
while ((c = get_opts ()) != -1)
@@ -646,11 +647,9 @@ TAO_IMR_Op_Remove::parse (int argc, ACE_TCHAR **argv)
return -1;
case 'f':
this->force_ = true;
- ++server_arg;
break;
case 's':
this->signum_ = ACE_OS::strtol (get_opts.opt_arg (), 0, 10);
- server_arg += 2;
break;
default:
ORBSVCS_ERROR((LM_ERROR, "ERROR : Unknown option '%c'\n", (char) c));
@@ -659,7 +658,6 @@ TAO_IMR_Op_Remove::parse (int argc, ACE_TCHAR **argv)
}
}
- this->server_name_ = ACE_TEXT_ALWAYS_CHAR(argv[server_arg]);
return 0;
}
diff --git a/TAO/orbsvcs/tests/ImplRepo/kill_server/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/kill_server/run_test.pl
index af95507decc..e162720d876 100755
--- a/TAO/orbsvcs/tests/ImplRepo/kill_server/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/kill_server/run_test.pl
@@ -18,7 +18,7 @@ my $signalnum = 9;
my $rm2523 = 0;
my $act_delay = 800; #msec
my $start_delay = 0; #sec
-my $rm_cmd = "remove";
+my $rm_opts = "";
my $force = 0;
if ($#ARGV >= 0) {
@@ -47,7 +47,7 @@ if ($#ARGV >= 0) {
$servers_count = 3;
}
elsif ($ARGV[$i] eq "-force") {
- $rm_cmd = "remove -f";
+ $rm_opts = "-f";
$force = 1;
}
elsif ($ARGV[$i] eq "-start_delay") {
@@ -59,7 +59,7 @@ if ($#ARGV >= 0) {
exit 1;
}
}
- $rm_cmd .= " -s $signalnum" if ($force == 1 && $sn_set == 1);
+ $rm_opts .= " -s $signalnum" if ($force == 1 && $sn_set == 1);
}
#$ENV{ACE_TEST_VERBOSE} = "1";
@@ -261,7 +261,7 @@ sub update_normal()
$TI->Arguments ("-ORBInitRef ImplRepoService=file://$ti_imriorfile ".
"add $objprefix" . '_' . $i . "_a -c \"".
$srv_server_cmd[$i].
- " -ORBUseIMR 1 -n $i -ORBDebugLevel 10 -ORBLogFile svr.log ".
+ " -ORBUseIMR 1 -n $i ".
"-orbendpoint iiop://localhost: " .
"-ORBInitRef ImplRepoService=file://$srv_imriorfile\"");
@@ -298,10 +298,10 @@ sub remove_entry(@)
my $obj = shift;
my $i = 1;
$TI->Arguments ("-ORBInitRef ImplRepoService=file://$ti_imriorfile ".
- "$rm_cmd $objprefix" . '_' . $i . "_$obj");
+ "remove $objprefix" . '_' . $i . "_$obj $rm_opts");
$TI_status = $TI->SpawnWaitKill ($ti->ProcessStartWaitInterval());
if ($TI_status != 0) {
- print STDERR "tao_imr $rm_cmd returned $TI_status\n";
+ print STDERR "tao_imr remove $rm_opts returned $TI_status\n";
}
}