aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenSim.Framework/Types/NetworkServersInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Common/OpenSim.Framework/Types/NetworkServersInfo.cs')
-rw-r--r--Common/OpenSim.Framework/Types/NetworkServersInfo.cs54
1 files changed, 36 insertions, 18 deletions
diff --git a/Common/OpenSim.Framework/Types/NetworkServersInfo.cs b/Common/OpenSim.Framework/Types/NetworkServersInfo.cs
index 709b7dd..9c2e7a6 100644
--- a/Common/OpenSim.Framework/Types/NetworkServersInfo.cs
+++ b/Common/OpenSim.Framework/Types/NetworkServersInfo.cs
@@ -48,6 +48,8 @@ namespace OpenSim.Framework.Types
48 public uint DefaultHomeLocX = 0; 48 public uint DefaultHomeLocX = 0;
49 public uint DefaultHomeLocY = 0; 49 public uint DefaultHomeLocY = 0;
50 50
51 public int HttpListenerPort = 9000;
52
51 public void InitConfig(bool sandboxMode, IGenericConfig configData) 53 public void InitConfig(bool sandboxMode, IGenericConfig configData)
52 { 54 {
53 this.isSandbox = sandboxMode; 55 this.isSandbox = sandboxMode;
@@ -55,34 +57,50 @@ namespace OpenSim.Framework.Types
55 try 57 try
56 { 58 {
57 string attri = ""; 59 string attri = "";
58 // default home location X 60
59 attri = ""; 61 attri = "";
60 attri = configData.GetAttribute("DefaultLocationX"); 62 attri = configData.GetAttribute("HttpListenerPort");
61 if (attri == "") 63 if (attri == "")
62 { 64 {
63 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); 65 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Http Listener Port", "9000");
64 configData.SetAttribute("DefaultLocationX", location); 66 configData.SetAttribute("HttpListenerPort", location);
65 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); 67 this.HttpListenerPort = Convert.ToInt32(location);
66 } 68 }
67 else 69 else
68 { 70 {
69 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri); 71 this.HttpListenerPort = Convert.ToInt32(attri);
70 } 72 }
71 73
72 // default home location Y 74 if (sandboxMode)
73 attri = "";
74 attri = configData.GetAttribute("DefaultLocationY");
75 if (attri == "")
76 {
77 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location Y", "1000");
78 configData.SetAttribute("DefaultLocationY", location);
79 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location);
80 }
81 else
82 { 75 {
83 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri); 76 // default home location X
84 } 77 attri = "";
78 attri = configData.GetAttribute("DefaultLocationX");
79 if (attri == "")
80 {
81 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location X", "1000");
82 configData.SetAttribute("DefaultLocationX", location);
83 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location);
84 }
85 else
86 {
87 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri);
88 }
85 89
90 // default home location Y
91 attri = "";
92 attri = configData.GetAttribute("DefaultLocationY");
93 if (attri == "")
94 {
95 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location Y", "1000");
96 configData.SetAttribute("DefaultLocationY", location);
97 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location);
98 }
99 else
100 {
101 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri);
102 }
103 }
86 if (!isSandbox) 104 if (!isSandbox)
87 { 105 {
88 //Grid Server 106 //Grid Server