diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-09-17 15:05:23 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-09-17 15:05:23 -0230 |
commit | a1aaac0e077cc4b4a97a985a9947d6415c771932 (patch) | |
tree | b5e568d95017620ed9a4ddac58143df7352449ac /cpp/src/IceBox/Admin.cpp | |
parent | Minor style fixes (diff) | |
download | ice-a1aaac0e077cc4b4a97a985a9947d6415c771932.tar.bz2 ice-a1aaac0e077cc4b4a97a985a9947d6415c771932.tar.xz ice-a1aaac0e077cc4b4a97a985a9947d6415c771932.zip |
ICE-6774 added iceboxadmin test to IceBox/admin
Diffstat (limited to 'cpp/src/IceBox/Admin.cpp')
-rw-r--r-- | cpp/src/IceBox/Admin.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index 1ec6952b76f..7e3bf812513 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -43,7 +43,7 @@ void Client::usage() { cerr << "Usage: " << appName() << " [options] [command...]\n"; - cerr << + cerr << "Options:\n" "-h, --help Show this message.\n" "-v, --version Display the Ice version.\n" @@ -91,7 +91,7 @@ Client::run(int argc, char* argv[]) return EXIT_FAILURE; } - + ObjectPrx base = communicator()->propertyToProxy("IceBoxAdmin.ServiceManager.Proxy"); if(base == 0) @@ -105,7 +105,7 @@ Client::run(int argc, char* argv[]) Identity managerIdentity; managerIdentity.category = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox"); managerIdentity.name = "ServiceManager"; - + string managerProxy; if(properties->getProperty("Ice.Default.Locator").empty()) { @@ -115,7 +115,7 @@ Client::run(int argc, char* argv[]) cerr << appName() << ": property `IceBoxAdmin.ServiceManager.Proxy' is not set" << endl; return EXIT_FAILURE; } - + managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" :" + managerEndpoints; } else @@ -126,7 +126,7 @@ Client::run(int argc, char* argv[]) cerr << appName() << ": property `IceBoxAdmin.ServiceManager.Proxy' is not set" << endl; return EXIT_FAILURE; } - + managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" @" + managerAdapterId; } @@ -176,6 +176,7 @@ Client::run(int argc, char* argv[]) catch(const IceBox::NoSuchServiceException&) { cerr << appName() << ": unknown service `" << *r << "'" << endl; + return EXIT_FAILURE; } catch(const IceBox::AlreadyStartedException&) { @@ -197,6 +198,7 @@ Client::run(int argc, char* argv[]) catch(const IceBox::NoSuchServiceException&) { cerr << appName() << ": unknown service `" << *r << "'" << endl; + return EXIT_FAILURE; } catch(const IceBox::AlreadyStoppedException&) { |