diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-03-03 13:05:19 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-03-03 13:05:19 -0330 |
commit | 2fe064b44b5d56c87b65e889bfe898ce2ee737fc (patch) | |
tree | d7cfb49f989a5fffa61791859b260f4048be4efe /cpp/src/Ice/Instance.cpp | |
parent | Fixed (ICE-5835) - Scope of operation parameters (diff) | |
download | ice-2fe064b44b5d56c87b65e889bfe898ce2ee737fc.tar.bz2 ice-2fe064b44b5d56c87b65e889bfe898ce2ee737fc.tar.xz ice-2fe064b44b5d56c87b65e889bfe898ce2ee737fc.zip |
ICE-6116 reduce verbose warnings about socket buffer size
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index b39bd0d7fe8..59d2287ac1f 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1890,6 +1890,57 @@ IceInternal::Instance::updateThreadObservers() } } + +BufSizeWarnInfo +IceInternal::Instance::getBufSizeWarn(Short type) +{ + IceUtil::Mutex::Lock lock(_setBufSizeWarnMutex); + + return getBufSizeWarnInternal(type); +} + +BufSizeWarnInfo +IceInternal::Instance::getBufSizeWarnInternal(Short type) +{ + BufSizeWarnInfo info; + map<Short, BufSizeWarnInfo>::iterator p = _setBufSizeWarn.find(type); + if(p == _setBufSizeWarn.end()) + { + info.sndWarn = false; + info.sndSize = -1; + info.rcvWarn = false; + info.rcvSize = -1; + _setBufSizeWarn.insert(make_pair(type, info)); + } + else + { + info = p->second; + } + return info; +} + +void +IceInternal::Instance::setSndBufSizeWarn(Short type, int size) +{ + IceUtil::Mutex::Lock lock(_setBufSizeWarnMutex); + + BufSizeWarnInfo info = getBufSizeWarnInternal(type); + info.sndWarn = true; + info.sndSize = size; + _setBufSizeWarn[type] = info; +} + +void +IceInternal::Instance::setRcvBufSizeWarn(Short type, int size) +{ + IceUtil::Mutex::Lock lock(_setBufSizeWarnMutex); + + BufSizeWarnInfo info = getBufSizeWarnInternal(type); + info.rcvWarn = true; + info.rcvSize = size; + _setBufSizeWarn[type] = info; +} + IceInternal::ProcessI::ProcessI(const CommunicatorPtr& communicator) : _communicator(communicator) { |