summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/EndpointI.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-05-16 19:13:34 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-05-16 19:13:34 +0000
commitd87f468730fd906d062e982bc401e450649d5576 (patch)
tree3a3c46780a818eeaa1ed3bea63593121ed9337c2 /cpp/src/IceSSL/EndpointI.cpp
parentBug 1625 - unused property warning (diff)
downloadice-d87f468730fd906d062e982bc401e450649d5576.tar.bz2
ice-d87f468730fd906d062e982bc401e450649d5576.tar.xz
ice-d87f468730fd906d062e982bc401e450649d5576.zip
Bug 1996 - multihomed hostnames
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index 69866544132..a14f152f3e1 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -327,7 +327,27 @@ IceSSL::EndpointI::expand(bool server) const
}
else
{
- endps.push_back(const_cast<EndpointI*>(this));
+ if(!server)
+ {
+
+ vector<string> hosts = IceInternal::getHosts(_host);
+ if(hosts.size() > 1)
+ {
+ for(unsigned int i = 0; i < hosts.size(); ++i)
+ {
+ endps.push_back(
+ new EndpointI(_instance, hosts[i], _port, _timeout, _connectionId, _compress, true));
+ }
+ }
+ else
+ {
+ endps.push_back(const_cast<EndpointI*>(this));
+ }
+ }
+ else
+ {
+ endps.push_back(const_cast<EndpointI*>(this));
+ }
}
return endps;
}