diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-03-08 19:37:13 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-03-08 19:37:13 -0500 |
commit | 11678336dea1f3676881b87bbe8ca3e3cb6b5296 (patch) | |
tree | ec4bbc16d9fdfe1f9c48f374f26169ba4e88cb3a /cpp/src/IceGrid/ServerAdapterI.cpp | |
parent | Python thread hook fixes (diff) | |
download | ice-11678336dea1f3676881b87bbe8ca3e3cb6b5296.tar.bz2 ice-11678336dea1f3676881b87bbe8ca3e3cb6b5296.tar.xz ice-11678336dea1f3676881b87bbe8ca3e3cb6b5296.zip |
Removed Current's default value in the C++11 mapping
Renamed Ice::noExplicitCurrent to Ice::emptyCurrent
Diffstat (limited to 'cpp/src/IceGrid/ServerAdapterI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerAdapterI.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/cpp/src/IceGrid/ServerAdapterI.cpp b/cpp/src/IceGrid/ServerAdapterI.cpp index d01a824c80d..879ffc6c2b8 100644 --- a/cpp/src/IceGrid/ServerAdapterI.cpp +++ b/cpp/src/IceGrid/ServerAdapterI.cpp @@ -17,10 +17,10 @@ using namespace std; using namespace IceGrid; ServerAdapterI::ServerAdapterI(const NodeIPtr& node, - ServerI* server, + ServerI* server, const string& serverName, const AdapterPrx& proxy, - const string& id, + const string& id, bool enabled) : _node(node), _this(proxy), @@ -52,7 +52,7 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur else if(_activateCB.empty()) { // - // Nothing else waits for this adapter so we must make sure that this + // Nothing else waits for this adapter so we must make sure that this // adapter if still activatable. // if(!_enabled || !_server->isAdapterActivatable(_id)) @@ -73,7 +73,8 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur { return; } - _activateAfterDeactivating = _server->getState() >= Deactivating && _server->getState() < Destroying; + _activateAfterDeactivating = _server->getState(Ice::emptyCurrent) >= Deactivating && + _server->getState(Ice::emptyCurrent) < Destroying; } // @@ -93,7 +94,7 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur catch(const Ice::ObjectNotExistException&) { // - // The server associated to this adapter doesn't exist anymore. Somehow the database is + // The server associated to this adapter doesn't exist anymore. Somehow the database is // inconsistent if this happens. The best thing to do is to destroy the adapter. // destroy(); @@ -140,7 +141,7 @@ ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Current&) { if(prx && _proxy) { - if(_server->getState() == Active) + if(_server->getState(Ice::emptyCurrent) == Active) { throw AdapterActiveException(); } @@ -156,7 +157,8 @@ ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Current&) // now. The server is going to be activated again and the adapter // activated. // - if(_server->getState() < Deactivating || _server->getState() >= Destroying || !_activateAfterDeactivating) + if(_server->getState(Ice::emptyCurrent) < Deactivating || + _server->getState(Ice::emptyCurrent) >= Destroying || !_activateAfterDeactivating) { for(vector<AMD_Adapter_activatePtr>::const_iterator p = _activateCB.begin(); p != _activateCB.end(); ++p) { @@ -211,7 +213,7 @@ void ServerAdapterI::updateEnabled() { Lock sync(*this); - _enabled = _server->isEnabled(); + _enabled = _server->isEnabled(Ice::emptyCurrent); } void @@ -222,7 +224,7 @@ ServerAdapterI::clear() _activateAfterDeactivating = false; } -void +void ServerAdapterI::activationFailed(const std::string& reason) { @@ -243,7 +245,7 @@ ServerAdapterI::activationFailed(const std::string& reason) _activateCB.clear(); } -void +void ServerAdapterI::activationCompleted() { Lock sync(*this); @@ -258,7 +260,7 @@ ServerAdapterI::activationCompleted() out << "server `" + _serverId + "' adapter `" << _id << "' activation failed: server activation completed"; } } - + for(vector<AMD_Adapter_activatePtr>::const_iterator p = _activateCB.begin(); p != _activateCB.end(); ++p) { (*p)->ice_response(_proxy); |