From 2cc2e228f93e4b75c0ae427ca3f7165653b18efc Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Thu, 16 Jun 2005 12:29:42 +0000 Subject: Fixes --- cpp/src/IceGrid/DescriptorHelper.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'cpp/src/IceGrid/DescriptorHelper.cpp') diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index 72acb4dd26b..6366a584fa9 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -724,8 +724,8 @@ ApplicationDescriptorHelper::update(const ApplicationUpdateDescriptor& update) ServerInstanceDescriptor inst = instantiate(*q); // Re-instantiate old server. if(updated.find(inst.descriptor->name) == updated.end() && remove.find(inst.descriptor->name) == remove.end()) { - if(ServerDescriptorHelper(*this, ServerDescriptorPtr::dynamicCast(q->descriptor)) != - ServerDescriptorHelper(*this, ServerDescriptorPtr::dynamicCast(inst.descriptor))) + if(q->node != inst.node || + ServerDescriptorHelper(*this, q->descriptor) != ServerDescriptorHelper(*this, inst.descriptor)) { newUpdate.servers.push_back(inst); } @@ -1045,7 +1045,6 @@ ServerDescriptorHelper::ServerDescriptorHelper(const DescriptorHelper& helper, c ComponentDescriptorHelper::init(_descriptor, attrs); - _descriptor->node = _variables->substitute("${node}"); _descriptor->pwd = attributes("pwd", ""); _descriptor->activation = attributes("activation", "manual"); @@ -1107,11 +1106,6 @@ ServerDescriptorHelper::operator==(const ServerDescriptorHelper& helper) const return false; } - if(_descriptor->node != helper._descriptor->node) - { - return false; - } - if(set(_descriptor->options.begin(), _descriptor->options.end()) != set(helper._descriptor->options.begin(), helper._descriptor->options.end())) { @@ -1169,8 +1163,8 @@ ServerDescriptorHelper::operator==(const ServerDescriptorHelper& helper) const if(q->descriptor && p->descriptor->name == q->descriptor->name) { found = true; - if(ServiceDescriptorHelper(*this, ServiceDescriptorPtr::dynamicCast(p->descriptor)) != - ServiceDescriptorHelper(*this, ServiceDescriptorPtr::dynamicCast(q->descriptor))) + if(ServiceDescriptorHelper(*this, p->descriptor) != + ServiceDescriptorHelper(*this, q->descriptor)) { return false; } @@ -1316,7 +1310,6 @@ ServerDescriptorHelper::instantiateImpl(const ServerDescriptorPtr& desc, setnode); substitute(desc->exe); substitute(desc->pwd); for_each(desc->options.begin(), desc->options.end(), substitute); @@ -1332,7 +1325,7 @@ ServerDescriptorHelper::instantiateImpl(const ServerDescriptorPtr& desc, set_cpp_template.empty()) { - ServiceDescriptorPtr service = ServiceDescriptorPtr::dynamicCast(p->descriptor); + ServiceDescriptorPtr service = p->descriptor; assert(service); p->descriptor = ServiceDescriptorHelper(*this, service).instantiate(missing); } -- cgit v1.2.3