diff options
author | Tedd Hansen | 2007-09-17 08:06:20 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-09-17 08:06:20 +0000 |
commit | 8792645e0da7f47ff7acd764b0855cd780d00d66 (patch) | |
tree | 34178deec83c74d373737a37461aaa740bcb5324 | |
parent | * Moved some commands from Scene into SceneManager so they could be used with... (diff) | |
download | opensim-SC_OLD-8792645e0da7f47ff7acd764b0855cd780d00d66.zip opensim-SC_OLD-8792645e0da7f47ff7acd764b0855cd780d00d66.tar.gz opensim-SC_OLD-8792645e0da7f47ff7acd764b0855cd780d00d66.tar.bz2 opensim-SC_OLD-8792645e0da7f47ff7acd764b0855cd780d00d66.tar.xz |
Forgot to check in prebuild.xml on sat, see someone already did :)
Fix in DNS resolve
-rw-r--r-- | OpenSim/Framework/General/Types/RegionInfo.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index dadc63d..c1e040d 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs | |||
@@ -61,8 +61,16 @@ namespace OpenSim.Framework.Types | |||
61 | // Old one defaults to IPv6 | 61 | // Old one defaults to IPv6 |
62 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); | 62 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); |
63 | 63 | ||
64 | // New method favors IPv4 | ||
65 | IPAddress ia = null; | 64 | IPAddress ia = null; |
65 | // If it is already an IP, don't resolve it - just return directly | ||
66 | if (IPAddress.TryParse(m_externalHostName, out ia)) | ||
67 | return new IPEndPoint(ia, m_internalEndPoint.Port); | ||
68 | |||
69 | // Reset for next check | ||
70 | ia = null; | ||
71 | |||
72 | |||
73 | // New method favors IPv4 | ||
66 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) | 74 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) |
67 | { | 75 | { |
68 | if (ia == null) | 76 | if (ia == null) |
@@ -188,7 +196,7 @@ namespace OpenSim.Framework.Types | |||
188 | { | 196 | { |
189 | errorMessage = "needs an IP Address (IPAddress)"; | 197 | errorMessage = "needs an IP Address (IPAddress)"; |
190 | } | 198 | } |
191 | this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port",(int) 9000); | 199 | this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", (int)9000); |
192 | 200 | ||
193 | string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); | 201 | string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); |
194 | if (externalHost != "SYSTEMIP") | 202 | if (externalHost != "SYSTEMIP") |