aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorlbsa712007-07-02 06:57:42 +0000
committerlbsa712007-07-02 06:57:42 +0000
commit9ff5bb9873e41936ef3ddb6fcea2f0529e425e52 (patch)
tree588dd7aa5fcd530b30b64db31a42cf6618fc5431 /OpenSim/Framework
parent* worked some more on the RegionInfo attr fuggliness (diff)
downloadopensim-SC_OLD-9ff5bb9873e41936ef3ddb6fcea2f0529e425e52.zip
opensim-SC_OLD-9ff5bb9873e41936ef3ddb6fcea2f0529e425e52.tar.gz
opensim-SC_OLD-9ff5bb9873e41936ef3ddb6fcea2f0529e425e52.tar.bz2
opensim-SC_OLD-9ff5bb9873e41936ef3ddb6fcea2f0529e425e52.tar.xz
* Applied Weathros/tedd's IP v6 patch
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
index 69a941e..7b99d06 100644
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -55,7 +55,25 @@ namespace OpenSim.Framework.Types
55 { 55 {
56 get 56 get
57 { 57 {
58 return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); 58 // Old one defaults to IPv6
59 //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port );
60
61 // New method favors IPv4
62 IPAddress ia = null;
63 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
64 {
65 if (ia == null)
66 ia = Adr;
67
68 if (Adr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
69 {
70 ia = Adr;
71 break;
72 }
73
74 }
75
76 return new IPEndPoint(ia, m_internalEndPoint.Port);
59 } 77 }
60 } 78 }
61 79