aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs19
-rw-r--r--OpenSim/Region/Application/OpenSim.cs29
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs12
3 files changed, 37 insertions, 23 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 4a7c8b0..8d95c41 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -107,15 +107,13 @@ namespace OpenSim
107 } 107 }
108 else 108 else
109 { 109 {
110 m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); 110 m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
111 Environment.Exit(1); 111 Environment.Exit(1);
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 116 string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
117 string iniFileName =
118 startupConfig.GetString("inifile", "OpenSim.ini");
119 117
120 if (IsUri(iniFileName)) 118 if (IsUri(iniFileName))
121 { 119 {
@@ -131,8 +129,7 @@ namespace OpenSim
131 if (!File.Exists(Application.iniFilePath)) 129 if (!File.Exists(Application.iniFilePath))
132 { 130 {
133 iniFileName = "OpenSim.xml"; 131 iniFileName = "OpenSim.xml";
134 Application.iniFilePath = Path.GetFullPath( 132 Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName));
135 Path.Combine(Util.configDir(), iniFileName));
136 } 133 }
137 134
138 if (File.Exists(Application.iniFilePath)) 135 if (File.Exists(Application.iniFilePath))
@@ -142,15 +139,12 @@ namespace OpenSim
142 } 139 }
143 } 140 }
144 141
145 string iniDirName = 142 string iniDirName = startupConfig.GetString("inidirectory", "config");
146 startupConfig.GetString("inidirectory", "config"); 143 string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
147 string iniDirPath =
148 Path.Combine(Util.configDir(), iniDirName);
149 144
150 if (Directory.Exists(iniDirPath)) 145 if (Directory.Exists(iniDirPath))
151 { 146 {
152 m_log.InfoFormat("Searching folder {0} for config ini files", 147 m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath);
153 iniDirPath);
154 148
155 string[] fileEntries = Directory.GetFiles(iniDirName); 149 string[] fileEntries = Directory.GetFiles(iniDirName);
156 foreach (string filePath in fileEntries) 150 foreach (string filePath in fileEntries)
@@ -172,7 +166,6 @@ namespace OpenSim
172 if (sources.Count == 0) 166 if (sources.Count == 0)
173 { 167 {
174 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 168 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
175 m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
176 Environment.Exit(1); 169 Environment.Exit(1);
177 } 170 }
178 171
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 3a1a8c7..145875b 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -250,8 +250,10 @@ namespace OpenSim
250 + "If level <= 0 then no extra http logging is done.\n", 250 + "If level <= 0 then no extra http logging is done.\n",
251 Debug); 251 Debug);
252 252
253 m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
254
253 m_console.Commands.AddCommand("region", false, "debug scene", 255 m_console.Commands.AddCommand("region", false, "debug scene",
254 "debug scene <cripting> <collisions> <physics>", 256 "debug scene <scripting> <collisions> <physics>",
255 "Turn on scene debugging", Debug); 257 "Turn on scene debugging", Debug);
256 258
257 m_console.Commands.AddCommand("region", false, "change region", 259 m_console.Commands.AddCommand("region", false, "change region",
@@ -289,12 +291,16 @@ namespace OpenSim
289 291
290 m_console.Commands.AddCommand("region", false, "save oar", 292 m_console.Commands.AddCommand("region", false, "save oar",
291 //"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]", 293 //"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
292 "save oar [-p|--profile=<url>] [--noassets] [--perm=<permissions>] [<OAR path>]", 294 "save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]",
293 "Save a region's data to an OAR archive.", 295 "Save a region's data to an OAR archive.",
294// "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine 296// "-v|--version=<N> generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
295 "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine 297 "-h|--home=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
296 + "--noassets stops assets being saved to the OAR." + Environment.NewLine 298 + "--noassets stops assets being saved to the OAR." + Environment.NewLine
297 + "--perm stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine 299 + "--publish saves an OAR stripped of owner and last owner information." + Environment.NewLine
300 + " on reload, the estate owner will be the owner of all objects" + Environment.NewLine
301 + " this is useful if you're making oars generally available that might be reloaded to the same grid from which you published" + Environment.NewLine
302 + " this option is EXPERIMENTAL" + Environment.NewLine
303 + "--perm=<permissions> stops objects with insufficient permissions from being saved to the OAR." + Environment.NewLine
298 + " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer" + Environment.NewLine 304 + " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer" + Environment.NewLine
299 + "The OAR path must be a filesystem path." 305 + "The OAR path must be a filesystem path."
300 + " If this is not given then the oar is saved to region.oar in the current directory.", 306 + " If this is not given then the oar is saved to region.oar in the current directory.",
@@ -948,6 +954,21 @@ namespace OpenSim
948 954
949 break; 955 break;
950 956
957 case "teleport":
958 foreach(Scene s in m_sceneManager.Scenes)
959 {
960 if (s.DEBUG)
961 {
962 s.DEBUG = false;
963 MainConsole.Instance.Output("Teleport debugging is disabled!");
964 }
965 else{
966 s.DEBUG = true;
967 MainConsole.Instance.Output("Teleport debugging is enabled!");
968 }
969 }
970 break;
971
951 default: 972 default:
952 MainConsole.Instance.Output("Unknown debug command"); 973 MainConsole.Instance.Output("Unknown debug command");
953 break; 974 break;
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 9f9b4f0..f482d8f 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -202,16 +202,16 @@ namespace OpenSim
202 // Load the simulation data service 202 // Load the simulation data service
203 IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; 203 IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
204 if (simDataConfig == null) 204 if (simDataConfig == null)
205 throw new Exception("Configuration file is missing the [SimulationDataStore] section"); 205 throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
206 string module = simDataConfig.GetString("LocalServiceModule", String.Empty); 206 string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
207 if (String.IsNullOrEmpty(module)) 207 if (String.IsNullOrEmpty(module))
208 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section"); 208 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section.");
209 m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); 209 m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
210 210
211 // Load the estate data service 211 // Load the estate data service
212 IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; 212 IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
213 if (estateDataConfig == null) 213 if (estateDataConfig == null)
214 throw new Exception("Configuration file is missing the [EstateDataStore] section"); 214 throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
215 module = estateDataConfig.GetString("LocalServiceModule", String.Empty); 215 module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
216 if (String.IsNullOrEmpty(module)) 216 if (String.IsNullOrEmpty(module))
217 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); 217 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");
@@ -383,6 +383,9 @@ namespace OpenSim
383 // TODO : Try setting resource for region xstats here on scene 383 // TODO : Try setting resource for region xstats here on scene
384 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 384 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
385 385
386 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
387 scene.EventManager.TriggerParcelPrimCountUpdate();
388
386 try 389 try
387 { 390 {
388 scene.RegisterRegionWithGrid(); 391 scene.RegisterRegionWithGrid();
@@ -398,9 +401,6 @@ namespace OpenSim
398 Environment.Exit(1); 401 Environment.Exit(1);
399 } 402 }
400 403
401 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
402 scene.EventManager.TriggerParcelPrimCountUpdate();
403
404 // We need to do this after we've initialized the 404 // We need to do this after we've initialized the
405 // scripting engines. 405 // scripting engines.
406 scene.CreateScriptInstances(); 406 scene.CreateScriptInstances();