diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-01-16 12:53:39 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-01-16 12:53:39 -0330 |
commit | 2f84f1c25575c5af7447d91878c47e2d1bd9b3df (patch) | |
tree | c9135e6b2034e0ec4301228a28dc3dbad6db2a17 /cpp/src | |
parent | Fixed multicast expect scripts (diff) | |
download | ice-2f84f1c25575c5af7447d91878c47e2d1bd9b3df.tar.bz2 ice-2f84f1c25575c5af7447d91878c47e2d1bd9b3df.tar.xz ice-2f84f1c25575c5af7447d91878c47e2d1bd9b3df.zip |
Bug 2436 - make updateLocatorRegistry thread safe
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 7d6028a75c8..ae6a90bbb09 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -1325,13 +1325,18 @@ ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locator if(registerProcess && !serverId.empty()) { - try { + IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this); + if(_processId.name == "") { ProcessPtr servant = new ProcessI(_communicator); _processId = addWithUUID(servant)->ice_getIdentity(); } + } + + try + { locatorRegistry->setServerProcessProxy(serverId, ProcessPrx::uncheckedCast(createDirectProxy(_processId))); } catch(const ServerNotFoundException&) |