From 6a0d4667eab20ac88adc42e31737d594931117ee Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 27 Jun 2007 08:47:57 +0000 Subject: [PATCH] * Added patch for SYSTEMIP handling when an IPv6 address is the primary address of the system. (as is the case on Windows Vista) --- Common/OpenSim.Framework/Types/RegionInfo.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Common/OpenSim.Framework/Types/RegionInfo.cs b/Common/OpenSim.Framework/Types/RegionInfo.cs index 3776c03067..48e692278c 100644 --- a/Common/OpenSim.Framework/Types/RegionInfo.cs +++ b/Common/OpenSim.Framework/Types/RegionInfo.cs @@ -177,7 +177,16 @@ namespace OpenSim.Framework.Types System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); try { - this.CommsIPListenAddr = ips[0].ToString(); + this.CommsIPListenAddr = "0.0.0.0"; // Incase a IPv4 address isnt found + + foreach (System.Net.IPAddress ip in ips) + { + if (ip.AddressFamily.ToString() == System.Net.Sockets.ProtocolFamily.InterNetwork.ToString()) + { + this.CommsIPListenAddr = ip.ToString(); + break; + } + } } catch (Exception e) {