diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 27 | ||||
-rw-r--r-- | cpp/src/IceGrid/IceGridNode.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/IceGridRegistry.cpp | 2 |
3 files changed, 7 insertions, 24 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index bf2287b9516..03a762bf3f1 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -68,7 +68,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p if(size < 1) { Warning out(_instance->initializationData().logger); - out << _prefix << ".Size < 0; Size adjusted to 1"; + out << _prefix << ".Size < 1; Size adjusted to 1"; size = 1; } @@ -83,28 +83,11 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p int sizeWarn = _instance->initializationData().properties-> getPropertyAsIntWithDefault(_prefix + ".SizeWarn", sizeMax * 80 / 100); - if(!_instance->initializationData().properties->getProperty(_prefix + ".SizeWarn").empty()) + if(sizeWarn > sizeMax) { - if(sizeWarn < size) - { - Warning out(_instance->initializationData().logger); - out << _prefix << ".SizeWarn < " << _prefix << ".Size; adjusted SizeWarn to Size (" << size << ")"; - } - else if(sizeWarn > sizeMax) - { - Warning out(_instance->initializationData().logger); - out << _prefix << ".SizeWarn > " << _prefix << ".SizeMax; adjusted SizeWarn to SizeMax (" << sizeMax << ")"; - } - } - - // - // We do this deliberately outside the above test, because sizeMax * 80 / 100 - // can evaluate to something < size, but we want to issue a warning only if - // SizeWarn was explicitly set. - // - if(sizeWarn < size) - { - sizeWarn = size; + Warning out(_instance->initializationData().logger); + out << _prefix << ".SizeWarn > " << _prefix << ".SizeMax; adjusted SizeWarn to SizeMax (" << sizeMax << ")"; + sizeWarn = sizeMax; } const_cast<int&>(_size) = size; diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 7323af304cd..fb0f5137df2 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -253,7 +253,7 @@ NodeService::start(int argc, char* argv[]) // // Warn the user that setting Ice.ThreadPool.Server isn't useful. // - if(properties->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 0) > 0) + if(!nowarn && properties->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 0) > 0) { Warning out(communicator()->getLogger()); out << "setting `Ice.ThreadPool.Server.Size' is not useful,\n"; diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp index 1a2478e46ea..dc718fa94b4 100644 --- a/cpp/src/IceGrid/IceGridRegistry.cpp +++ b/cpp/src/IceGrid/IceGridRegistry.cpp @@ -87,7 +87,7 @@ RegistryService::start(int argc, char* argv[]) // // Warn the user that setting Ice.ThreadPool.Server isn't useful. // - if(communicator()->getProperties()->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 0) > 0) + if(!nowarn && communicator()->getProperties()->getPropertyAsIntWithDefault("Ice.ThreadPool.Server.Size", 0) > 0) { Warning out(communicator()->getLogger()); out << "setting `Ice.ThreadPool.Server.Size' is not useful,\n"; |