aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs38
1 files changed, 8 insertions, 30 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index c333e0e..81523e0 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -37,7 +37,7 @@ using OpenSim.Framework.Data;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Types; 39using OpenSim.Framework.Types;
40using OpenSim.GenericConfig; 40using OpenSim.Framework.Configuration;
41using OpenSim.Physics.Manager; 41using OpenSim.Physics.Manager;
42using OpenSim.Region.Caches; 42using OpenSim.Region.Caches;
43using OpenSim.Region.ClientStack; 43using OpenSim.Region.ClientStack;
@@ -85,6 +85,9 @@ namespace OpenSim
85 /// </summary> 85 /// </summary>
86 public override void StartUp() 86 public override void StartUp()
87 { 87 {
88 m_log = new LogBase(m_logFilename, "Region", this, m_silent);
89 MainLog.Instance = m_log;
90
88 base.StartUp(); 91 base.StartUp();
89 92
90 if (!m_sandbox) 93 if (!m_sandbox)
@@ -108,27 +111,16 @@ namespace OpenSim
108 { 111 {
109 string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); 112 string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions");
110 string path3 = Path.Combine(path2, "default.xml"); 113 string path3 = Path.Combine(path2, "default.xml");
111 Console.WriteLine("Creating default region config file"); 114
112 //TODO create default region 115 RegionInfo regionInfo = new RegionInfo("DEFAULT REGION CONFIG", path3);
113 IGenericConfig defaultConfig = new XmlConfig(path3);
114 defaultConfig.LoadData();
115 defaultConfig.Commit();
116 defaultConfig.Close();
117 defaultConfig = null;
118 configFiles = Directory.GetFiles(path, "*.xml"); 116 configFiles = Directory.GetFiles(path, "*.xml");
119 } 117 }
120 118
121 for (int i = 0; i < configFiles.Length; i++) 119 for (int i = 0; i < configFiles.Length; i++)
122 { 120 {
123 Console.WriteLine("Loading region config file"); 121 Console.WriteLine("Loading region config file");
124 122 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i]);
125 IGenericConfig regionConfig = new XmlConfig(configFiles[i]); 123
126 RegionInfo regionInfo = new RegionInfo();
127 regionConfig.LoadData();
128 regionInfo.InitConfig(this.m_sandbox, regionConfig);
129 regionConfig.Close();
130
131
132 UDPServer udpServer; 124 UDPServer udpServer;
133 Scene scene = SetupScene(regionInfo, out udpServer); 125 Scene scene = SetupScene(regionInfo, out udpServer);
134 126
@@ -159,21 +151,7 @@ namespace OpenSim
159 151
160 protected override void Initialize() 152 protected override void Initialize()
161 { 153 {
162 IGenericConfig localConfig = new XmlConfig(m_configFileName);
163 localConfig.LoadData();
164
165 if (m_useConfigFile)
166 {
167 SetupFromConfigFile(localConfig);
168 }
169
170 StartLog();
171
172 m_networkServersInfo.InitConfig(m_sandbox, localConfig);
173 m_httpServerPort = m_networkServersInfo.HttpListenerPort; 154 m_httpServerPort = m_networkServersInfo.HttpListenerPort;
174
175 localConfig.Close();
176
177 m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); 155 m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey);
178 } 156 }
179 157