summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/IceGridRegistry.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2008-03-12 17:56:56 +0100
committerBenoit Foucher <benoit@zeroc.com>2008-03-12 17:56:56 +0100
commitddf655a37d5d62a3b89adbf4d7ad9d23da65756c (patch)
tree0930dab75fd5b5153ddfde972d5d7a946ef55541 /cpp/src/IceGrid/IceGridRegistry.cpp
parentSLES fixes (diff)
downloadice-ddf655a37d5d62a3b89adbf4d7ad9d23da65756c.tar.bz2
ice-ddf655a37d5d62a3b89adbf4d7ad9d23da65756c.tar.xz
ice-ddf655a37d5d62a3b89adbf4d7ad9d23da65756c.zip
Fixed bug 2738
Diffstat (limited to 'cpp/src/IceGrid/IceGridRegistry.cpp')
-rw-r--r--cpp/src/IceGrid/IceGridRegistry.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp
index af8320582cf..c3a681e99bd 100644
--- a/cpp/src/IceGrid/IceGridRegistry.cpp
+++ b/cpp/src/IceGrid/IceGridRegistry.cpp
@@ -66,11 +66,13 @@ bool
RegistryService::start(int argc, char* argv[])
{
bool nowarn;
+ bool readonly;
IceUtilInternal::Options opts;
opts.addOpt("h", "help");
opts.addOpt("v", "version");
opts.addOpt("", "nowarn");
+ opts.addOpt("", "readonly");
vector<string> args;
try
@@ -95,6 +97,7 @@ RegistryService::start(int argc, char* argv[])
return false;
}
nowarn = opts.isSet("nowarn");
+ readonly = opts.isSet("readonly");
if(!args.empty())
{
@@ -117,7 +120,7 @@ RegistryService::start(int argc, char* argv[])
TraceLevelsPtr traceLevels = new TraceLevels(communicator(), "IceGrid.Registry");
- _registry = new RegistryI(communicator(), traceLevels, nowarn);
+ _registry = new RegistryI(communicator(), traceLevels, nowarn, readonly);
if(!_registry->start())
{
return false;
@@ -167,7 +170,8 @@ RegistryService::usage(const string& appName)
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
- "--nowarn Don't print any security warnings.";
+ "--nowarn Don't print any security warnings."
+ "--readonly Start the master registry in read-only mode.";
#ifndef _WIN32
options.append(
"\n"