diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-11-14 17:20:45 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-11-14 17:20:45 +0000 |
commit | 94837d3b73433306c094f47689dc6f6d9d8bdfdd (patch) | |
tree | 5948eb86aedda879f017af52517f633a056cbe1e /cpp/src/IceSSL/EndpointI.cpp | |
parent | Added findAllReplicas to IceGrid::Query interface (diff) | |
download | ice-94837d3b73433306c094f47689dc6f6d9d8bdfdd.tar.bz2 ice-94837d3b73433306c094f47689dc6f6d9d8bdfdd.tar.xz ice-94837d3b73433306c094f47689dc6f6d9d8bdfdd.zip |
No -h in client-side endpoint means use loopback
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r-- | cpp/src/IceSSL/EndpointI.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp index b2db179fa0f..e3e61db7b8b 100644 --- a/cpp/src/IceSSL/EndpointI.cpp +++ b/cpp/src/IceSSL/EndpointI.cpp @@ -138,19 +138,6 @@ IceSSL::EndpointI::EndpointI(const InstancePtr& instance, const string& str) : } } } - - if(_host.empty()) - { - const_cast<string&>(_host) = _instance->defaultHost(); - if(_host.empty()) - { - const_cast<string&>(_host) = "0.0.0.0"; - } - } - else if(_host == "*") - { - const_cast<string&>(_host) = "0.0.0.0"; - } } IceSSL::EndpointI::EndpointI(const InstancePtr& instance, IceInternal::BasicStream* s) : @@ -306,8 +293,28 @@ IceSSL::EndpointI::acceptor(IceInternal::EndpointIPtr& endp, const string& adapt } vector<IceInternal::EndpointIPtr> -IceSSL::EndpointI::expand() const +IceSSL::EndpointI::expand(bool server) const { + if(_host.empty()) + { + const_cast<string&>(_host) = _instance->defaultHost(); + if(_host.empty()) + { + if(server) + { + const_cast<string&>(_host) = "0.0.0.0"; + } + else + { + const_cast<string&>(_host) = "127.0.0.1"; + } + } + } + else if(_host == "*") + { + const_cast<string&>(_host) = "0.0.0.0"; + } + vector<IceInternal::EndpointIPtr> endps; if(_host == "0.0.0.0") { |