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/Instance.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/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 11d27fc1111..5f9034be027 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1260,11 +1260,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi { static const int defaultMessageSizeMax = 1024; Int num = _initData.properties->getPropertyAsIntWithDefault("Ice.MessageSizeMax", defaultMessageSizeMax); - if(num < 1) - { - const_cast<size_t&>(_messageSizeMax) = defaultMessageSizeMax * 1024; // Ignore non-sensical values. - } - else if(static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024)) + if(num < 1 || static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024)) { const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(0x7fffffff); } |