diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-02-13 17:53:37 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-02-13 17:53:37 +0000 |
commit | 966060d3a694438bc977ff5be79e33c77ace765a (patch) | |
tree | 78b9e96a2ac9a94e7379f9f4b5ce1c67b6a941d0 /java/src/IceSSL/SslEndpointI.java | |
parent | Fix (diff) | |
download | ice-966060d3a694438bc977ff5be79e33c77ace765a.tar.bz2 ice-966060d3a694438bc977ff5be79e33c77ace765a.tar.xz ice-966060d3a694438bc977ff5be79e33c77ace765a.zip |
Bug 804 - no endpoint in reference means try all local interfaces
Diffstat (limited to 'java/src/IceSSL/SslEndpointI.java')
-rw-r--r-- | java/src/IceSSL/SslEndpointI.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/java/src/IceSSL/SslEndpointI.java b/java/src/IceSSL/SslEndpointI.java index db130be2258..d10edc06f18 100644 --- a/java/src/IceSSL/SslEndpointI.java +++ b/java/src/IceSSL/SslEndpointI.java @@ -27,7 +27,7 @@ final class SslEndpointI extends IceInternal.EndpointI } public - SslEndpointI(Instance instance, String str, boolean adapterEndp) + SslEndpointI(Instance instance, String str) { _instance = instance; _host = null; @@ -138,17 +138,10 @@ final class SslEndpointI extends IceInternal.EndpointI _host = _instance.defaultHost(); if(_host == null) { - if(adapterEndp) - { - _host = "0.0.0.0"; - } - else - { - _host = IceInternal.Network.getLocalHost(true); - } + _host = "0.0.0.0"; } } - else if(_host.equals("*") && adapterEndp) + else if(_host.equals("*")) { _host = "0.0.0.0"; } @@ -367,7 +360,7 @@ final class SslEndpointI extends IceInternal.EndpointI // only applies for ObjectAdapter endpoints. // public java.util.ArrayList - expand() + expand(boolean includeLoopback) { java.util.ArrayList endps = new java.util.ArrayList(); if(_host.equals("0.0.0.0")) @@ -377,8 +370,11 @@ final class SslEndpointI extends IceInternal.EndpointI while(iter.hasNext()) { String host = (String)iter.next(); - endps.add(new SslEndpointI(_instance, host, _port, _timeout, _connectionId, _compress, - hosts.size() == 1 || !host.equals("127.0.0.1"))); + if(includeLoopback || hosts.size() == 1 || !host.equals("127.0.0.1")) + { + endps.add(new SslEndpointI(_instance, host, _port, _timeout, _connectionId, _compress, + hosts.size() == 1 || !host.equals("127.0.0.1"))); + } } } else |