diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-12-16 17:42:36 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-12-16 17:42:36 +0000 |
commit | c18ab936b6a123e69dd7ba3543fbb691f04b92b8 (patch) | |
tree | 8d62299bf620147a557533cd878a6b047d87dc4f /cpp | |
parent | removed RecursiveMutex (diff) | |
download | ice-c18ab936b6a123e69dd7ba3543fbb691f04b92b8.tar.bz2 ice-c18ab936b6a123e69dd7ba3543fbb691f04b92b8.tar.xz ice-c18ab936b6a123e69dd7ba3543fbb691f04b92b8.zip |
Check communicator state.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/CommunicatorI.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp index db6547e34aa..2c18ed1d56a 100644 --- a/cpp/src/Ice/CommunicatorI.cpp +++ b/cpp/src/Ice/CommunicatorI.cpp @@ -264,12 +264,22 @@ Ice::CommunicatorI::setLogger(const LoggerPtr& logger) void Ice::CommunicatorI::setDefaultRouter(const RouterPrx& router) { + RecMutex::Lock sync(*this); + if(_destroyed) + { + throw CommunicatorDestroyedException(__FILE__, __LINE__); + } _instance->referenceFactory()->setDefaultRouter(router); } void Ice::CommunicatorI::setDefaultLocator(const LocatorPrx& locator) { + RecMutex::Lock sync(*this); + if(_destroyed) + { + throw CommunicatorDestroyedException(__FILE__, __LINE__); + } _instance->referenceFactory()->setDefaultLocator(locator); } |