summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-05-17 13:04:02 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-05-17 13:04:02 +0000
commite9bf853661640a7558ae25e25a7d24b84e82b201 (patch)
tree76b06b5b5b907abe4edd7f45e9d814e0a5baea66
parentiBacked out multihome change (diff)
downloadice-e9bf853661640a7558ae25e25a7d24b84e82b201.tar.bz2
ice-e9bf853661640a7558ae25e25a7d24b84e82b201.tar.xz
ice-e9bf853661640a7558ae25e25a7d24b84e82b201.zip
Backed out multihome change
-rw-r--r--cpp/CHANGES4
-rw-r--r--cs/CHANGES4
-rwxr-xr-xcs/src/Ice/Network.cs39
-rwxr-xr-xcs/src/Ice/TcpEndpointI.cs24
-rwxr-xr-xcs/src/Ice/UdpEndpointI.cs24
-rwxr-xr-xcs/src/IceSSL/EndpointI.cs24
-rw-r--r--java/CHANGES4
-rw-r--r--java/src/IceInternal/Network.java35
-rw-r--r--java/src/IceInternal/TcpEndpointI.java25
-rw-r--r--java/src/IceInternal/UdpEndpointI.java25
-rw-r--r--java/ssl/jdk1.4/IceSSL/EndpointI.java25
-rw-r--r--java/ssl/jdk1.5/IceSSL/EndpointI.java25
12 files changed, 14 insertions, 244 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES
index 4d6c32f6633..0aaf25ced36 100644
--- a/cpp/CHANGES
+++ b/cpp/CHANGES
@@ -1,10 +1,6 @@
Changes since version 3.2.X (binary incompabible)
-------------------------------------------------
-- If a client endpoint configuration contains a host which is multihomed,
- the client will now use all the available ip addresses. Previously,
- only the first in the address list was used and others were ignored.
-
- Added a new property, Ice.Warn.UnusedProperties. If set to 1, when
the communicator is destroyed a warning will be printed listing all
properties that were set, but never read. Default is 0.
diff --git a/cs/CHANGES b/cs/CHANGES
index d0f18625885..1298ded0991 100644
--- a/cs/CHANGES
+++ b/cs/CHANGES
@@ -1,10 +1,6 @@
Changes since version 3.2.X (binary incompabible)
-------------------------------------------------
-- If a client endpoint configuration contains a host which is multihomed,
- the client will now use all the available ip addresses. Previously,
- only the first in the address list was used and others were ignored.
-
- Added a new property, Ice.Warn.UnusedProperties. If set to 1, when
the communicator is destroyed a warning will be printed listing all
properties that were set, but never read. Default is 0.
diff --git a/cs/src/Ice/Network.cs b/cs/src/Ice/Network.cs
index 9dd94ee1ae6..0e30942dc87 100755
--- a/cs/src/Ice/Network.cs
+++ b/cs/src/Ice/Network.cs
@@ -824,45 +824,6 @@ namespace IceInternal
throw dns;
}
- public static string[] getHosts(string host)
- {
- ArrayList hosts;
-
- int retry = 5;
-
- repeatGetHostByName:
- try
- {
- IPHostEntry e = Dns.GetHostEntry(host);
- hosts = new ArrayList();
- for(int i = 0; i < e.AddressList.Length; ++i)
- {
- if(e.AddressList[i].AddressFamily != AddressFamily.InterNetworkV6)
- {
- hosts.Add(e.AddressList[i].ToString());
- }
- }
- }
- catch(Win32Exception ex)
- {
- if(ex.NativeErrorCode == WSATRY_AGAIN && --retry >= 0)
- {
- goto repeatGetHostByName;
- }
- Ice.DNSException e = new Ice.DNSException(ex);
- e.host = host;
- throw e;
- }
- catch(System.Exception ex)
- {
- Ice.DNSException e = new Ice.DNSException(ex);
- e.host = host;
- throw e;
- }
-
- return (string[])hosts.ToArray(typeof(string));
- }
-
public static string[] getLocalHosts()
{
ArrayList hosts;
diff --git a/cs/src/Ice/TcpEndpointI.cs b/cs/src/Ice/TcpEndpointI.cs
index f6b7205bfd3..be5f9a8068a 100755
--- a/cs/src/Ice/TcpEndpointI.cs
+++ b/cs/src/Ice/TcpEndpointI.cs
@@ -391,28 +391,8 @@ namespace IceInternal
}
else
{
- if(!server)
- {
- string[] hosts = Network.getHosts(_host);
- if(hosts.Length > 1)
- {
- for(int i = 0; i < hosts.Length; ++i)
- {
- endps.Add(
- new TcpEndpointI(instance_, hosts[i], _port, _timeout, _connectionId, _compress, true));
- }
- }
- else
- {
- calcHashValue();
- endps.Add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.Add(this);
- }
+ calcHashValue();
+ endps.Add(this);
}
return endps;
}
diff --git a/cs/src/Ice/UdpEndpointI.cs b/cs/src/Ice/UdpEndpointI.cs
index 598176603a7..043ca36e4ba 100755
--- a/cs/src/Ice/UdpEndpointI.cs
+++ b/cs/src/Ice/UdpEndpointI.cs
@@ -540,28 +540,8 @@ namespace IceInternal
}
else
{
- if(!server)
- {
- string[] hosts = Network.getHosts(_host);
- if(hosts.Length > 1)
- {
- for(int i = 0; i < hosts.Length; ++i)
- {
- endps.Add(
- new UdpEndpointI(instance_, hosts[i], _port, _connect, _connectionId, _compress, true));
- }
- }
- else
- {
- calcHashValue();
- endps.Add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.Add(this);
- }
+ calcHashValue();
+ endps.Add(this);
}
return endps;
}
diff --git a/cs/src/IceSSL/EndpointI.cs b/cs/src/IceSSL/EndpointI.cs
index 7f10167918a..bd5b8148e68 100755
--- a/cs/src/IceSSL/EndpointI.cs
+++ b/cs/src/IceSSL/EndpointI.cs
@@ -388,28 +388,8 @@ namespace IceSSL
}
else
{
- if(!server)
- {
- string[] hosts = IceInternal.Network.getHosts(host_);
- if(hosts.Length > 1)
- {
- for(int i = 0; i < hosts.Length; ++i)
- {
- endps.Add(
- new EndpointI(instance_, hosts[i], port_, timeout_, connectionId_, compress_, true));
- }
- }
- else
- {
- calcHashValue();
- endps.Add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.Add(this);
- }
+ calcHashValue();
+ endps.Add(this);
}
return endps;
}
diff --git a/java/CHANGES b/java/CHANGES
index 1422898c28b..4f51fadb3ff 100644
--- a/java/CHANGES
+++ b/java/CHANGES
@@ -1,10 +1,6 @@
Changes since version 3.2.X (binary incompabible)
-------------------------------------------------
-- If a client endpoint configuration contains a host which is multihomed,
- the client will now use all the available ip addresses. Previously,
- only the first in the address list was used and others were ignored.
-
- Added a new property, Ice.Warn.UnusedProperties. If set to 1, when
the communicator is destroyed a warning will be printed listing all
properties that were set, but never read. Default is 0.
diff --git a/java/src/IceInternal/Network.java b/java/src/IceInternal/Network.java
index cfa52fa0e4c..92a1547d234 100644
--- a/java/src/IceInternal/Network.java
+++ b/java/src/IceInternal/Network.java
@@ -654,41 +654,6 @@ public final class Network
}
public static java.util.ArrayList
- getHosts(String host)
- {
- java.util.ArrayList hosts = new java.util.ArrayList();
- try
- {
- java.net.InetAddress[] addrs = java.net.InetAddress.getAllByName(host);
- for(int i = 0; i < addrs.length; ++i)
- {
- if(addrs[i] instanceof java.net.Inet4Address)
- {
- hosts.add(addrs[i].getHostAddress());
- }
- }
- }
- catch(java.net.UnknownHostException ex)
- {
- Ice.DNSException e = new Ice.DNSException();
- e.host = host;
- throw e;
- }
-
- //
- // No Inet4Address available.
- //
- if(hosts.size() == 0)
- {
- Ice.DNSException e = new Ice.DNSException();
- e.host = host;
- throw e;
- }
-
- return hosts;
- }
-
- public static java.util.ArrayList
getLocalHosts()
{
java.util.ArrayList hosts = new java.util.ArrayList();
diff --git a/java/src/IceInternal/TcpEndpointI.java b/java/src/IceInternal/TcpEndpointI.java
index e83c38ac416..21eb90d067c 100644
--- a/java/src/IceInternal/TcpEndpointI.java
+++ b/java/src/IceInternal/TcpEndpointI.java
@@ -388,29 +388,8 @@ final class TcpEndpointI extends EndpointI
}
else
{
- if(!server)
- {
- java.util.ArrayList hosts = Network.getHosts(_host);
- if(hosts.size() > 1)
- {
- java.util.Iterator iter = hosts.iterator();
- while(iter.hasNext())
- {
- String host = (String)iter.next();
- endps.add(new TcpEndpointI(_instance, host, _port, _timeout, _connectionId, _compress, true));
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
+ calcHashValue();
+ endps.add(this);
}
return endps;
}
diff --git a/java/src/IceInternal/UdpEndpointI.java b/java/src/IceInternal/UdpEndpointI.java
index 44f3a01b5c0..6207a0499b8 100644
--- a/java/src/IceInternal/UdpEndpointI.java
+++ b/java/src/IceInternal/UdpEndpointI.java
@@ -523,29 +523,8 @@ final class UdpEndpointI extends EndpointI
}
else
{
- if(!server)
- {
- java.util.ArrayList hosts = Network.getHosts(_host);
- if(hosts.size() > 1)
- {
- java.util.Iterator iter = hosts.iterator();
- while(iter.hasNext())
- {
- String host = (String)iter.next();
- endps.add(new UdpEndpointI(_instance, host, _port, _connect, _connectionId, _compress, true));
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
+ calcHashValue();
+ endps.add(this);
}
return endps;
}
diff --git a/java/ssl/jdk1.4/IceSSL/EndpointI.java b/java/ssl/jdk1.4/IceSSL/EndpointI.java
index e164d10111d..40c51386679 100644
--- a/java/ssl/jdk1.4/IceSSL/EndpointI.java
+++ b/java/ssl/jdk1.4/IceSSL/EndpointI.java
@@ -388,29 +388,8 @@ final class EndpointI extends IceInternal.EndpointI
}
else
{
- if(!server)
- {
- java.util.ArrayList hosts = IceInternal.Network.getHosts(_host);
- if(hosts.size() > 1)
- {
- java.util.Iterator iter = hosts.iterator();
- while(iter.hasNext())
- {
- String host = (String)iter.next();
- endps.add(new EndpointI(_instance, host, _port, _timeout, _connectionId, _compress, true));
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
+ calcHashValue();
+ endps.add(this);
}
return endps;
}
diff --git a/java/ssl/jdk1.5/IceSSL/EndpointI.java b/java/ssl/jdk1.5/IceSSL/EndpointI.java
index 1153d352f9d..fb640240eff 100644
--- a/java/ssl/jdk1.5/IceSSL/EndpointI.java
+++ b/java/ssl/jdk1.5/IceSSL/EndpointI.java
@@ -388,29 +388,8 @@ final class EndpointI extends IceInternal.EndpointI
}
else
{
- if(!server)
- {
- java.util.ArrayList hosts = IceInternal.Network.getHosts(_host);
- if(hosts.size() > 1)
- {
- java.util.Iterator iter = hosts.iterator();
- while(iter.hasNext())
- {
- String host = (String)iter.next();
- endps.add(new EndpointI(_instance, host, _port, _timeout, _connectionId, _compress, true));
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
- }
- else
- {
- calcHashValue();
- endps.add(this);
- }
+ calcHashValue();
+ endps.add(this);
}
return endps;
}