diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-11-05 19:05:58 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-11-05 19:05:58 +0100 |
commit | 4abc9627f945c0b765cfaa326a38a548470890da (patch) | |
tree | 0f9ad49ec73e1c49a4715b4534634f0b1f5932da /cpp/src/Ice/ObjectAdapterI.cpp | |
parent | WinRT installer remove 8.0 SDK registry key (diff) | |
download | ice-4abc9627f945c0b765cfaa326a38a548470890da.tar.bz2 ice-4abc9627f945c0b765cfaa326a38a548470890da.tar.xz ice-4abc9627f945c0b765cfaa326a38a548470890da.zip |
Fixed ICE-5486: added support for MessageSizeMax OA property
Diffstat (limited to 'cpp/src/Ice/ObjectAdapterI.cpp')
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 537aab5f79d..2fd1f92d10f 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -858,7 +858,8 @@ Ice::ObjectAdapterI::ObjectAdapterI(const InstancePtr& instance, const Communica _servantManager(new ServantManager(instance, name)), _name(name), _directCount(0), - _noConfig(noConfig) + _noConfig(noConfig), + _messageSizeMax(0) { } @@ -923,6 +924,19 @@ Ice::ObjectAdapterI::initialize(const RouterPrx& router) const_cast<ACMConfig&>(_acm) = ACMConfig(properties, _communicator->getLogger(), _name + ".ACM", _instance->serverACM()); + { + const int defaultMessageSizeMax = _instance->messageSizeMax() / 1024; + Int num = properties->getPropertyAsIntWithDefault(_name + ".MessageSizeMax", defaultMessageSizeMax); + if(num < 1 || static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024)) + { + const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(0x7fffffff); + } + else + { + const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(num) * 1024; + } + } + int threadPoolSize = properties->getPropertyAsInt(_name + ".ThreadPool.Size"); int threadPoolSizeMax = properties->getPropertyAsInt(_name + ".ThreadPool.SizeMax"); bool hasPriority = properties->getProperty(_name + ".ThreadPool.ThreadPriority") != ""; @@ -1415,6 +1429,7 @@ Ice::ObjectAdapterI::filterProperties(StringSeq& unknownProps) "Locator.PreferSecure", "Locator.CollocationOptimized", "Locator.Router", + "MessageSizeMax", "PublishedEndpoints", "RegisterProcess", "ReplicaGroupId", |