summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Admin.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-02-12 14:54:45 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-02-12 14:54:45 +0000
commit6888e262f377011620d49d224bc73b5237a45980 (patch)
tree3ee0778e551638f6d06ec385e99f4ec036af69ca /cpp/src/IceStorm/Admin.cpp
parentFixed bug 1790 (diff)
downloadice-6888e262f377011620d49d224bc73b5237a45980.tar.bz2
ice-6888e262f377011620d49d224bc73b5237a45980.tar.xz
ice-6888e262f377011620d49d224bc73b5237a45980.zip
Use propertyToProxy in a couple more places
Diffstat (limited to 'cpp/src/IceStorm/Admin.cpp')
-rw-r--r--cpp/src/IceStorm/Admin.cpp36
1 files changed, 21 insertions, 15 deletions
diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp
index 62ab8958c0a..db7d90eb292 100644
--- a/cpp/src/IceStorm/Admin.cpp
+++ b/cpp/src/IceStorm/Admin.cpp
@@ -136,15 +136,15 @@ Client::run(int argc, char* argv[])
// IceStorm.TopicManager.Proxy is the "default" manager.
PropertiesPtr properties = communicator()->getProperties();
- const char* managerProxyProperty = "IceStorm.TopicManager.Proxy";
- string managerProxy = properties->getProperty(managerProxyProperty);
+ const char* managerProxy= "IceStorm.TopicManager.Proxy";
+ string managerProxyValue = properties->getProperty(managerProxy);
IceStorm::TopicManagerPrx defaultManager;
- if(!managerProxy.empty())
+ if(!managerProxyValue.empty())
{
- defaultManager = IceStorm::TopicManagerPrx::checkedCast(communicator()->stringToProxy(managerProxy));
+ defaultManager = IceStorm::TopicManagerPrx::checkedCast(communicator()->propertyToProxy(managerProxy));
if(!defaultManager)
{
- cerr << appName() << ": `" << managerProxy << "' is not running" << endl;
+ cerr << appName() << ": `" << managerProxyValue << "' is not running" << endl;
return EXIT_FAILURE;
}
managers.insert(map<Ice::Identity, IceStorm::TopicManagerPrx>::value_type(
@@ -158,17 +158,23 @@ Client::run(int argc, char* argv[])
{
for(Ice::PropertyDict::const_iterator p = props.begin(); p != props.end(); ++p)
{
- try
- {
- IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::uncheckedCast(
- communicator()->stringToProxy(p->second));
- managers.insert(map<Ice::Identity, IceStorm::TopicManagerPrx>::value_type(
- manager->ice_getIdentity(), manager));
- }
- catch(const Ice::ProxyParseException&)
+ //
+ // Ignore proxy property settings. eg IceStormAdmin.TopicManager.*.LocatorCacheTimeout
+ //
+ if(p->first.find('.', strlen("IceStormAdmin.TopicManager.")) == string::npos)
{
- cerr << appName() << ": malformed proxy: " << p->second << endl;
- return EXIT_FAILURE;
+ try
+ {
+ IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::uncheckedCast(
+ communicator()->propertyToProxy(p->first));
+ managers.insert(map<Ice::Identity, IceStorm::TopicManagerPrx>::value_type(
+ manager->ice_getIdentity(), manager));
+ }
+ catch(const Ice::ProxyParseException&)
+ {
+ cerr << appName() << ": malformed proxy: " << p->second << endl;
+ return EXIT_FAILURE;
+ }
}
}
if(props.empty() && !defaultManager)