diff options
author | Marc Laukien <marc@zeroc.com> | 2002-02-14 04:16:37 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-02-14 04:16:37 +0000 |
commit | 0f6931918a5fe32cd90fb9f599682838f48cb716 (patch) | |
tree | 3201933dcf9691bffd803ed0116895dbf5645d8a /cpp/src/Ice/Instance.cpp | |
parent | Removed file that shouldn't be present until after merging FreezeXML (diff) | |
download | ice-0f6931918a5fe32cd90fb9f599682838f48cb716.tar.bz2 ice-0f6931918a5fe32cd90fb9f599682838f48cb716.tar.xz ice-0f6931918a5fe32cd90fb9f599682838f48cb716.zip |
fixes, simplifications
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 0944c67443f..8ae3d115247 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -181,11 +181,8 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope if (++_globalStateCounter == 1) // Only on first call { - string value; - // Must be done before "Ice.Daemon" is checked - value = _properties->getProperty("Ice.PrintProcessId"); - if (atoi(value.c_str()) >= 1) + if (atoi(_properties->getProperty("Ice.PrintProcessId").c_str()) > 0) { #ifdef WIN32 cout << _getpid() << endl; @@ -195,14 +192,10 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope } #ifndef WIN32 - value = _properties->getProperty("Ice.Daemon"); - if (atoi(value.c_str()) >= 1) + if (atoi(_properties->getProperty("Ice.Daemon").c_str()) > 0) { - value = _properties->getProperty("Ice.DaemonNoClose"); - int noclose = atoi(value.c_str()); - - value = _properties->getProperty("Ice.DaemonNoChdir"); - int nochdir = atoi(value.c_str()); + int noclose = atoi(_properties->getProperty("Ice.DaemonNoClose").c_str()); + int nochdir = atoi(_properties->getProperty("Ice.DaemonNoChdir").c_str()); if (daemon(nochdir, noclose) == -1) { @@ -216,8 +209,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope #endif #ifndef WIN32 - value = _properties->getProperty("Ice.UseSyslog"); - if (atoi(value.c_str()) >= 1) + if (atoi(_properties->getProperty("Ice.UseSyslog").c_str()) > 0) { _identForOpenlog = _properties->getProperty("Ice.ProgramName"); if (_identForOpenlog.empty()) @@ -265,10 +257,8 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope try { __setNoDelete(true); - string value; #ifndef WIN32 - value = _properties->getProperty("Ice.UseSyslog"); - if (atoi(value.c_str()) >= 1) + if (atoi(_properties->getProperty("Ice.UseSyslog").c_str()) > 0) { _logger = new SysLoggerI; } @@ -293,10 +283,10 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope _routerManager = new RouterManager; _referenceFactory = new ReferenceFactory(this); _proxyFactory = new ProxyFactory(this); - value = _properties->getProperty("Ice.DefaultRouter"); - if (!value.empty()) + string router = _properties->getProperty("Ice.DefaultRouter"); + if (!router.empty()) { - _referenceFactory->setDefaultRouter(RouterPrx::uncheckedCast(_proxyFactory->stringToProxy(value))); + _referenceFactory->setDefaultRouter(RouterPrx::uncheckedCast(_proxyFactory->stringToProxy(router))); } _outgoingConnectionFactory = new OutgoingConnectionFactory(this); _servantFactoryManager = new ObjectFactoryManager(); |