aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General
diff options
context:
space:
mode:
authorTedd Hansen2007-09-12 05:37:46 +0000
committerTedd Hansen2007-09-12 05:37:46 +0000
commit5ade01bb493919c65eb3a9c0fc3f76710eea018c (patch)
tree31356ad7d62c2f2ea6d3045b5f3204ae6f47804e /OpenSim/Framework/General
parentdebug for mysql issue (diff)
downloadopensim-SC_OLD-5ade01bb493919c65eb3a9c0fc3f76710eea018c.zip
opensim-SC_OLD-5ade01bb493919c65eb3a9c0fc3f76710eea018c.tar.gz
opensim-SC_OLD-5ade01bb493919c65eb3a9c0fc3f76710eea018c.tar.bz2
opensim-SC_OLD-5ade01bb493919c65eb3a9c0fc3f76710eea018c.tar.xz
Fixed DNS resolve bug for Grid mode on multi-Homer systems.
Diffstat (limited to 'OpenSim/Framework/General')
-rw-r--r--OpenSim/Framework/General/Util.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs
index a263d7e..fe4ce29 100644
--- a/OpenSim/Framework/General/Util.cs
+++ b/OpenSim/Framework/General/Util.cs
@@ -249,6 +249,13 @@ namespace OpenSim.Framework.Utilities
249 /// <returns>An IP address, or null</returns> 249 /// <returns>An IP address, or null</returns>
250 public static IPAddress GetHostFromDNS(string dnsAddress) 250 public static IPAddress GetHostFromDNS(string dnsAddress)
251 { 251 {
252
253 // Is it already a valid IP? No need to look it up.
254 IPAddress ipa;
255 if (IPAddress.TryParse(dnsAddress, out ipa))
256 return ipa;
257
258 // Not an IP, lookup required
252 IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList; 259 IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList;
253 260
254 foreach (IPAddress host in hosts) 261 foreach (IPAddress host in hosts)