diff options
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 |