summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/DescriptorHelper.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-08-19 14:35:34 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-08-19 14:35:34 +0000
commit03fb156e997f64dd80d695d34c4eaeefc4ca0956 (patch)
treecb63867223b81f0fd8db37c22e8c5de450a32ae3 /cpp/src/IceGrid/DescriptorHelper.cpp
parentbug fix (diff)
downloadice-03fb156e997f64dd80d695d34c4eaeefc4ca0956.tar.bz2
ice-03fb156e997f64dd80d695d34c4eaeefc4ca0956.tar.xz
ice-03fb156e997f64dd80d695d34c4eaeefc4ca0956.zip
Added initial IcePatch2 support in IceGrid.
Diffstat (limited to 'cpp/src/IceGrid/DescriptorHelper.cpp')
-rw-r--r--cpp/src/IceGrid/DescriptorHelper.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp
index 435ca1d1f12..69c60462dcf 100644
--- a/cpp/src/IceGrid/DescriptorHelper.cpp
+++ b/cpp/src/IceGrid/DescriptorHelper.cpp
@@ -747,6 +747,12 @@ ServerHelper::operator==(const ServerHelper& helper) const
return false;
}
+ if(set<PatchDescriptor>(_desc->patchs.begin(), _desc->patchs.end()) !=
+ set<PatchDescriptor>(helper._desc->patchs.begin(), helper._desc->patchs.end()))
+ {
+ return false;
+ }
+
return true;
}
@@ -779,6 +785,17 @@ ServerHelper::instantiateImpl(const ServerDescriptorPtr& instance, const Resolve
{
instance->envs.push_back(resolve(*p, "environment variable"));
}
+ for(PatchDescriptorSeq::const_iterator p = _desc->patchs.begin(); p != _desc->patchs.end(); ++p)
+ {
+ PatchDescriptor patch;
+ patch.destination = resolve(p->destination, "patch destination directory");
+ patch.proxy = resolve(p->proxy, "patch server proxy");
+ for(Ice::StringSeq::const_iterator q = p->sources.begin(); q != p->sources.end(); ++q)
+ {
+ patch.sources.push_back(resolve(*q, "patch source directory"));
+ }
+ instance->patchs.push_back(patch);
+ }
}
ServerDescriptorPtr
@@ -837,6 +854,17 @@ ServerHelper::printImpl(Output& out, const string& application, const string& no
{
out << nl << "envs = '" << toString(_desc->envs) << "'";
}
+ if(!_desc->patchs.empty())
+ {
+ for(PatchDescriptorSeq::const_iterator p = _desc->patchs.begin(); p != _desc->patchs.end(); ++p)
+ {
+ out << nl << "patch `" << p->destination << "'";
+ out << sb;
+ out << nl << "proxy = '" << p->proxy << "'";
+ out << nl << "sources = " << toString(p->sources);
+ out << eb;
+ }
+ }
CommunicatorHelper::print(out);
}