diff options
author | UbitUmarov | 2015-09-01 14:54:35 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 14:54:35 +0100 |
commit | 371c9dd2af01a2e7422ec901ee1f80757284a78c (patch) | |
tree | 058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Region/Application/OpenSimBase.cs | |
parent | remove lixo (diff) | |
parent | dont change camera on crossings (diff) | |
download | opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2 opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz |
bad merge?
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 92 |
1 files changed, 88 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 3be411a..760decd 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -112,6 +112,10 @@ namespace OpenSim | |||
112 | 112 | ||
113 | public List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 113 | public List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
114 | 114 | ||
115 | private List<string> m_permsModules; | ||
116 | |||
117 | private bool m_securePermissionsLoading = true; | ||
118 | |||
115 | /// <value> | 119 | /// <value> |
116 | /// The config information passed into the OpenSimulator region server. | 120 | /// The config information passed into the OpenSimulator region server. |
117 | /// </value> | 121 | /// </value> |
@@ -228,6 +232,14 @@ namespace OpenSim | |||
228 | CreatePIDFile(pidFile); | 232 | CreatePIDFile(pidFile); |
229 | 233 | ||
230 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 234 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
235 | |||
236 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | ||
237 | |||
238 | string permissionModules = Util.GetConfigVarFromSections<string>(Config, "permissionmodules", | ||
239 | new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); | ||
240 | |||
241 | m_permsModules = new List<string>(permissionModules.Split(',')); | ||
242 | |||
231 | managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty); | 243 | managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty); |
232 | } | 244 | } |
233 | 245 | ||
@@ -264,11 +276,21 @@ namespace OpenSim | |||
264 | 276 | ||
265 | base.StartupSpecific(); | 277 | base.StartupSpecific(); |
266 | 278 | ||
279 | <<<<<<< HEAD | ||
267 | if (EnableInitialPluginLoad) | 280 | if (EnableInitialPluginLoad) |
268 | LoadPlugins(); | 281 | LoadPlugins(); |
269 | 282 | ||
270 | // We still want to post initalize any plugins even if loading has been disabled since a test may have | 283 | // We still want to post initalize any plugins even if loading has been disabled since a test may have |
271 | // inserted them manually. | 284 | // inserted them manually. |
285 | ======= | ||
286 | LoadPlugins(); | ||
287 | |||
288 | if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! | ||
289 | { | ||
290 | Environment.Exit(1); | ||
291 | } | ||
292 | |||
293 | >>>>>>> avn/ubitvar | ||
272 | foreach (IApplicationPlugin plugin in m_plugins) | 294 | foreach (IApplicationPlugin plugin in m_plugins) |
273 | plugin.PostInitialise(); | 295 | plugin.PostInitialise(); |
274 | 296 | ||
@@ -290,10 +312,10 @@ namespace OpenSim | |||
290 | "help " + capitalizedTopic, | 312 | "help " + capitalizedTopic, |
291 | "Get help on plugin command '" + topic + "'", | 313 | "Get help on plugin command '" + topic + "'", |
292 | HandleCommanderHelp); | 314 | HandleCommanderHelp); |
293 | console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, | 315 | // console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, |
294 | "help " + capitalizedTopic, | 316 | // "help " + capitalizedTopic, |
295 | "Get help on plugin command '" + topic + "'", | 317 | // "Get help on plugin command '" + topic + "'", |
296 | HandleCommanderHelp); | 318 | // HandleCommanderHelp); |
297 | 319 | ||
298 | ICommander commander = null; | 320 | ICommander commander = null; |
299 | 321 | ||
@@ -420,7 +442,32 @@ namespace OpenSim | |||
420 | } | 442 | } |
421 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); | 443 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); |
422 | 444 | ||
445 | if (m_securePermissionsLoading) | ||
446 | { | ||
447 | foreach (string s in m_permsModules) | ||
448 | { | ||
449 | if (!scene.RegionModules.ContainsKey(s)) | ||
450 | { | ||
451 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
452 | Environment.Exit(0); | ||
453 | } | ||
454 | } | ||
455 | |||
456 | m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray())); | ||
457 | } | ||
458 | |||
423 | scene.SetModuleInterfaces(); | 459 | scene.SetModuleInterfaces(); |
460 | // First Step of bootreport sequence | ||
461 | if (scene.SnmpService != null) | ||
462 | { | ||
463 | scene.SnmpService.ColdStart(1,scene); | ||
464 | scene.SnmpService.LinkDown(scene); | ||
465 | } | ||
466 | |||
467 | if (scene.SnmpService != null) | ||
468 | { | ||
469 | scene.SnmpService.BootInfo("Loading prins", scene); | ||
470 | } | ||
424 | 471 | ||
425 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | 472 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) |
426 | SetUpEstateOwner(scene); | 473 | SetUpEstateOwner(scene); |
@@ -434,6 +481,11 @@ namespace OpenSim | |||
434 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 481 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
435 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 482 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
436 | 483 | ||
484 | if (scene.SnmpService != null) | ||
485 | { | ||
486 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | ||
487 | } | ||
488 | |||
437 | try | 489 | try |
438 | { | 490 | { |
439 | scene.RegisterRegionWithGrid(); | 491 | scene.RegisterRegionWithGrid(); |
@@ -444,15 +496,29 @@ namespace OpenSim | |||
444 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | 496 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", |
445 | e.Message, e.StackTrace); | 497 | e.Message, e.StackTrace); |
446 | 498 | ||
499 | if (scene.SnmpService != null) | ||
500 | { | ||
501 | scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); | ||
502 | } | ||
447 | // Carrying on now causes a lot of confusion down the | 503 | // Carrying on now causes a lot of confusion down the |
448 | // line - we need to get the user's attention | 504 | // line - we need to get the user's attention |
449 | Environment.Exit(1); | 505 | Environment.Exit(1); |
450 | } | 506 | } |
451 | 507 | ||
508 | if (scene.SnmpService != null) | ||
509 | { | ||
510 | scene.SnmpService.BootInfo("Grid Registration done", scene); | ||
511 | } | ||
512 | |||
452 | // We need to do this after we've initialized the | 513 | // We need to do this after we've initialized the |
453 | // scripting engines. | 514 | // scripting engines. |
454 | scene.CreateScriptInstances(); | 515 | scene.CreateScriptInstances(); |
455 | 516 | ||
517 | if (scene.SnmpService != null) | ||
518 | { | ||
519 | scene.SnmpService.BootInfo("ScriptEngine started", scene); | ||
520 | } | ||
521 | |||
456 | SceneManager.Add(scene); | 522 | SceneManager.Add(scene); |
457 | 523 | ||
458 | if (m_autoCreateClientStack) | 524 | if (m_autoCreateClientStack) |
@@ -464,10 +530,20 @@ namespace OpenSim | |||
464 | } | 530 | } |
465 | } | 531 | } |
466 | 532 | ||
533 | if (scene.SnmpService != null) | ||
534 | { | ||
535 | scene.SnmpService.BootInfo("Initializing region modules", scene); | ||
536 | } | ||
467 | scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; | 537 | scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; |
468 | 538 | ||
469 | mscene = scene; | 539 | mscene = scene; |
470 | 540 | ||
541 | if (scene.SnmpService != null) | ||
542 | { | ||
543 | scene.SnmpService.BootInfo("The region is operational", scene); | ||
544 | scene.SnmpService.LinkUp(scene); | ||
545 | } | ||
546 | |||
471 | return clientServers; | 547 | return clientServers; |
472 | } | 548 | } |
473 | 549 | ||
@@ -583,6 +659,11 @@ namespace OpenSim | |||
583 | private void ShutdownRegion(Scene scene) | 659 | private void ShutdownRegion(Scene scene) |
584 | { | 660 | { |
585 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); | 661 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); |
662 | if (scene.SnmpService != null) | ||
663 | { | ||
664 | scene.SnmpService.BootInfo("The region is shutting down", scene); | ||
665 | scene.SnmpService.LinkDown(scene); | ||
666 | } | ||
586 | IRegionModulesController controller; | 667 | IRegionModulesController controller; |
587 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) | 668 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) |
588 | { | 669 | { |
@@ -751,7 +832,10 @@ namespace OpenSim | |||
751 | { | 832 | { |
752 | Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ); | 833 | Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ); |
753 | PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent); | 834 | PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent); |
835 | <<<<<<< HEAD | ||
754 | 836 | ||
837 | ======= | ||
838 | >>>>>>> avn/ubitvar | ||
755 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); | 839 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); |
756 | 840 | ||
757 | return new Scene( | 841 | return new Scene( |