aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/RegionInfo.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-05-27 08:13:55 +0000
committerAdam Frisby2007-05-27 08:13:55 +0000
commita33f244b58cae2bd2d704e4fa3f1fcfebd575dfa (patch)
treec7820b6f283b7e0bf52c713550c6a6651efd71d4 /OpenSim/OpenSim.RegionServer/RegionInfo.cs
parent* Region Terrain textures are now loaded from the RegionInfo class rather tha... (diff)
downloadopensim-SC_OLD-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.zip
opensim-SC_OLD-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.tar.gz
opensim-SC_OLD-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.tar.bz2
opensim-SC_OLD-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.tar.xz
* Inserting "SYSTEMIP" into a simconfig.xml's IPAddress="" section will use the first resolved IP of the system. This is to assist with Adam's lazy-deploy system but may be useful to others.
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/RegionInfo.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionInfo.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/OpenSim.RegionServer/RegionInfo.cs b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
index 60a5861..1608f4b 100644
--- a/OpenSim/OpenSim.RegionServer/RegionInfo.cs
+++ b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
@@ -173,7 +173,25 @@ namespace OpenSim
173 } 173 }
174 else 174 else
175 { 175 {
176 this.IPListenAddr = attri; 176 // Probably belongs elsewhere, but oh well.
177 if (attri.Trim().StartsWith("SYSTEMIP"))
178 {
179 string localhostname = System.Net.Dns.GetHostName();
180 System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname);
181 try
182 {
183 this.IPListenAddr = ips[0].ToString();
184 }
185 catch (Exception e)
186 {
187 e.ToString();
188 this.IPListenAddr = "127.0.0.1"; // Use the default if we fail
189 }
190 }
191 else
192 {
193 this.IPListenAddr = attri;
194 }
177 } 195 }
178 196
179 // Terrain Default File 197 // Terrain Default File