diff options
Diffstat (limited to 'Common/OpenSim.Framework')
-rw-r--r-- | Common/OpenSim.Framework/Types/RegionInfo.cs | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/Common/OpenSim.Framework/Types/RegionInfo.cs b/Common/OpenSim.Framework/Types/RegionInfo.cs index 651cd5b..3776c03 100644 --- a/Common/OpenSim.Framework/Types/RegionInfo.cs +++ b/Common/OpenSim.Framework/Types/RegionInfo.cs | |||
@@ -52,8 +52,19 @@ namespace OpenSim.Framework.Types | |||
52 | public string MasterAvatarLastName = ""; | 52 | public string MasterAvatarLastName = ""; |
53 | public string MasterAvatarSandboxPassword = ""; | 53 | public string MasterAvatarSandboxPassword = ""; |
54 | 54 | ||
55 | public int IPListenPort = 0; | 55 | /// <summary> |
56 | public string IPListenAddr = ""; | 56 | /// Port used for listening (TCP and UDP) |
57 | /// </summary> | ||
58 | /// <remarks>Seperate TCP and UDP</remarks> | ||
59 | public int CommsIPListenPort = 0; | ||
60 | /// <summary> | ||
61 | /// Address used for internal listening (default: 0.0.0.0?) | ||
62 | /// </summary> | ||
63 | public string CommsIPListenAddr = ""; | ||
64 | /// <summary> | ||
65 | /// Address used for external addressing (DNS or IP) | ||
66 | /// </summary> | ||
67 | public string CommsExternalAddress = ""; | ||
57 | 68 | ||
58 | 69 | ||
59 | public EstateSettings estateSettings; | 70 | public EstateSettings estateSettings; |
@@ -142,11 +153,11 @@ namespace OpenSim.Framework.Types | |||
142 | { | 153 | { |
143 | string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000"); | 154 | string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000"); |
144 | configData.SetAttribute("SimListenPort", port); | 155 | configData.SetAttribute("SimListenPort", port); |
145 | this.IPListenPort = Convert.ToInt32(port); | 156 | this.CommsIPListenPort = Convert.ToInt32(port); |
146 | } | 157 | } |
147 | else | 158 | else |
148 | { | 159 | { |
149 | this.IPListenPort = Convert.ToInt32(attri); | 160 | this.CommsIPListenPort = Convert.ToInt32(attri); |
150 | } | 161 | } |
151 | 162 | ||
152 | //Sim Listen Address | 163 | //Sim Listen Address |
@@ -154,8 +165,8 @@ namespace OpenSim.Framework.Types | |||
154 | attri = configData.GetAttribute("SimListenAddress"); | 165 | attri = configData.GetAttribute("SimListenAddress"); |
155 | if (attri == "") | 166 | if (attri == "") |
156 | { | 167 | { |
157 | this.IPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1"); | 168 | this.CommsIPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "0.0.0.0"); |
158 | configData.SetAttribute("SimListenAddress", this.IPListenAddr); | 169 | configData.SetAttribute("SimListenAddress", this.CommsIPListenAddr); |
159 | } | 170 | } |
160 | else | 171 | else |
161 | { | 172 | { |
@@ -166,20 +177,33 @@ namespace OpenSim.Framework.Types | |||
166 | System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); | 177 | System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname); |
167 | try | 178 | try |
168 | { | 179 | { |
169 | this.IPListenAddr = ips[0].ToString(); | 180 | this.CommsIPListenAddr = ips[0].ToString(); |
170 | } | 181 | } |
171 | catch (Exception e) | 182 | catch (Exception e) |
172 | { | 183 | { |
173 | e.ToString(); | 184 | e.ToString(); |
174 | this.IPListenAddr = "127.0.0.1"; // Use the default if we fail | 185 | this.CommsIPListenAddr = "0.0.0.0"; // Use the default if we fail |
175 | } | 186 | } |
176 | } | 187 | } |
177 | else | 188 | else |
178 | { | 189 | { |
179 | this.IPListenAddr = attri; | 190 | this.CommsIPListenAddr = attri; |
180 | } | 191 | } |
181 | } | 192 | } |
182 | 193 | ||
194 | // Sim External Address | ||
195 | attri = ""; | ||
196 | attri = configData.GetAttribute("SimExternalAddress"); | ||
197 | if (attri == "") | ||
198 | { | ||
199 | this.CommsExternalAddress = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP or DNS address to send external clients to", "localhost"); | ||
200 | configData.SetAttribute("SimExternalAddress", this.CommsExternalAddress); | ||
201 | } | ||
202 | else | ||
203 | { | ||
204 | this.CommsExternalAddress = attri; | ||
205 | } | ||
206 | |||
183 | attri = ""; | 207 | attri = ""; |
184 | attri = configData.GetAttribute("TerrainFile"); | 208 | attri = configData.GetAttribute("TerrainFile"); |
185 | if (attri == "") | 209 | if (attri == "") |
@@ -263,7 +287,7 @@ namespace OpenSim.Framework.Types | |||
263 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName); | 287 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName); |
264 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); | 288 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); |
265 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString()); | 289 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString()); |
266 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); | 290 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.CommsIPListenAddr + ":" + this.CommsIPListenPort); |
267 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString()); | 291 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString()); |
268 | 292 | ||
269 | } | 293 | } |