From 144e9fe4e514ae4c1fe3bdc877a00d4787be31c9 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Tue, 27 Jun 2006 10:48:31 +0000 Subject: Fixed bug 710 --- cpp/src/Ice/ThreadPool.cpp | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'cpp/src/Ice/ThreadPool.cpp') 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(_size) = size; -- cgit v1.2.3