diff options
author | Adam Frisby | 2007-05-27 08:13:55 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-27 08:13:55 +0000 |
commit | a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa (patch) | |
tree | c7820b6f283b7e0bf52c713550c6a6651efd71d4 /OpenSim | |
parent | * Region Terrain textures are now loaded from the RegionInfo class rather tha... (diff) | |
download | opensim-SC-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.zip opensim-SC-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.tar.gz opensim-SC-a33f244b58cae2bd2d704e4fa3f1fcfebd575dfa.tar.bz2 opensim-SC-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')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/RegionInfo.cs | 20 |
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 |