diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-08-24 11:28:20 -0400 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-08-24 11:28:20 -0400 |
commit | 9a07052d6711858507faa27ff736d4520b3163e9 (patch) | |
tree | 7fa0a0406be0386a8314b2e8c742f29bf127b70d /cpp/src/IceGrid/ServerAdapterI.cpp | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
parent | Squashed commit of the following: (diff) | |
download | ice-9a07052d6711858507faa27ff736d4520b3163e9.tar.bz2 ice-9a07052d6711858507faa27ff736d4520b3163e9.tar.xz ice-9a07052d6711858507faa27ff736d4520b3163e9.zip |
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/src/IceGrid/ServerAdapterI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerAdapterI.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/ServerAdapterI.cpp b/cpp/src/IceGrid/ServerAdapterI.cpp index 85023b27a3d..b6835e6d90f 100644 --- a/cpp/src/IceGrid/ServerAdapterI.cpp +++ b/cpp/src/IceGrid/ServerAdapterI.cpp @@ -70,6 +70,7 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur { return; } + _activateAfterDeactivating = _server->getState() >= Deactivating; } // @@ -141,11 +142,20 @@ ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Current&) bool updated = _proxy != prx; _proxy = prx; - for(vector<AMD_Adapter_activatePtr>::const_iterator p = _activateCB.begin(); p != _activateCB.end(); ++p) + // + // If the server is being deactivated and the activation callback + // was added during the deactivation, we don't send the response + // now. The server is going to be activated again and the adapter + // activated. + // + if(_server->getState() < Deactivating || !_activateAfterDeactivating) { - (*p)->ice_response(_proxy); + for(vector<AMD_Adapter_activatePtr>::const_iterator p = _activateCB.begin(); p != _activateCB.end(); ++p) + { + (*p)->ice_response(_proxy); + } + _activateCB.clear(); } - _activateCB.clear(); if(updated) { @@ -186,6 +196,7 @@ ServerAdapterI::clear() { Lock sync(*this); _proxy = 0; + _activateAfterDeactivating = false; } void |