diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-11-11 14:30:54 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-11-11 14:30:54 +0000 |
commit | 96b7a48aee60aa2fe3b0c442b1ffeafadfd7f9b3 (patch) | |
tree | 1de113511fc4689a1b6e0ae604aeedf5edc6e808 /cpp/src | |
parent | maybe finally have worked out the conditional installation for .net? (diff) | |
download | ice-96b7a48aee60aa2fe3b0c442b1ffeafadfd7f9b3.tar.bz2 ice-96b7a48aee60aa2fe3b0c442b1ffeafadfd7f9b3.tar.xz ice-96b7a48aee60aa2fe3b0c442b1ffeafadfd7f9b3.zip |
Fix.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/NodeI.cpp | 33 | ||||
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 2 |
2 files changed, 31 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp index 0fdb413263c..4d8f6d524c8 100644 --- a/cpp/src/IceGrid/NodeI.cpp +++ b/cpp/src/IceGrid/NodeI.cpp @@ -288,12 +288,39 @@ NodeI::patch(const string& application, } _patchInProgress.insert(application); - if(server.empty() || !appDistrib.icepatch.empty()) + if(!appDistrib.icepatch.empty()) { + // + // Get all the application servers (even the ones which + // don't have a distribution since they depend on the + // application distribution). + // servers = getApplicationServers(application); } + else if(server.empty()) + { + // + // Get all the application servers which have a distribution. + // + servers = getApplicationServers(application); + set<ServerIPtr>::iterator s = servers.begin(); + while(s != servers.end()) + { + if((*s)->getDistribution().icepatch.empty()) + { + servers.erase(s++); + } + else + { + ++s; + } + } + } else { + // + // Get the given server. + // Ice::Identity id = createServerIdentity(server); ServerIPtr svr = ServerIPtr::dynamicCast(_adapter->find(id)); if(svr) @@ -361,12 +388,12 @@ NodeI::patch(const string& application, // for(s = servers.begin(); s != servers.end(); ++s) { - if(!server.empty() && (*s)->getId() != server) + DistributionDescriptor dist = (*s)->getDistribution(); + if(dist.icepatch.empty() || (!server.empty() && (*s)->getId() != server)) { continue; } - DistributionDescriptor dist = (*s)->getDistribution(); icepatch = FileServerPrx::checkedCast(getCommunicator()->stringToProxy(dist.icepatch)); if(!icepatch) { diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 8cd5ce1bad0..5f085fe85c3 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -1164,7 +1164,7 @@ ServerI::terminated() if(_state != ServerI::Destroying) { - setStateNoSync(ServerI::Inactive); + setStateNoSync(ServerI::Inactive, "The server terminated unexpectedly."); command = nextCommand(); } else |