aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/Application.cs1
-rw-r--r--OpenSim/Region/Application/OpenSim.cs38
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs92
3 files changed, 120 insertions, 11 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index bf34419..e441cc8 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -75,6 +75,7 @@ namespace OpenSim
75 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 75 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
76 76
77 ServicePointManager.DefaultConnectionLimit = 12; 77 ServicePointManager.DefaultConnectionLimit = 12;
78 ServicePointManager.UseNagleAlgorithm = false;
78 79
79 // Add the arguments supplied when running the application to the configuration 80 // Add the arguments supplied when running the application to the configuration
80 ArgvConfigSource configSource = new ArgvConfigSource(args); 81 ArgvConfigSource configSource = new ArgvConfigSource(args);
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 5af8194..a350510 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -109,13 +109,19 @@ namespace OpenSim
109 m_timeInterval = startupConfig.GetInt("timer_Interval", 1200); 109 m_timeInterval = startupConfig.GetInt("timer_Interval", 1200);
110 } 110 }
111 111
112 AvatarWearable.MAX_WEARABLES = startupConfig.GetInt("max_wearables", AvatarWearable.MAX_WEARABLES);
112 string asyncCallMethodStr = startupConfig.GetString("async_call_method", String.Empty); 113 string asyncCallMethodStr = startupConfig.GetString("async_call_method", String.Empty);
113 FireAndForgetMethod asyncCallMethod; 114 FireAndForgetMethod asyncCallMethod;
114 if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) 115 if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod))
115 Util.FireAndForgetMethod = asyncCallMethod; 116 Util.FireAndForgetMethod = asyncCallMethod;
116 117
118<<<<<<< HEAD
117 stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15); 119 stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15);
118 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 300); 120 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 300);
121=======
122 stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 );
123 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25);
124>>>>>>> avn/ubitvar
119 m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); 125 m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) ");
120 } 126 }
121 127
@@ -267,12 +273,20 @@ namespace OpenSim
267 SavePrimsXml2); 273 SavePrimsXml2);
268 274
269 m_console.Commands.AddCommand("Archiving", false, "load oar", 275 m_console.Commands.AddCommand("Archiving", false, "load oar",
276<<<<<<< HEAD
277=======
278
279>>>>>>> avn/ubitvar
270 "load oar [--merge] [--skip-assets]" 280 "load oar [--merge] [--skip-assets]"
271 + " [--default-user \"User Name\"]" 281 + " [--default-user \"User Name\"]"
272 + " [--force-terrain] [--force-parcels]" 282 + " [--force-terrain] [--force-parcels]"
273 + " [--no-objects]" 283 + " [--no-objects]"
274 + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]" 284 + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]"
285<<<<<<< HEAD
275 + " [--displacement \"<x,y,z>\"]" 286 + " [--displacement \"<x,y,z>\"]"
287=======
288 + " [--displacement \"<x,y,z>\"]"
289>>>>>>> avn/ubitvar
276 + " [<OAR path>]", 290 + " [<OAR path>]",
277 "Load a region's data from an OAR archive.", 291 "Load a region's data from an OAR archive.",
278 "--merge will merge the OAR with the existing scene (suppresses terrain and parcel info loading).\n" 292 "--merge will merge the OAR with the existing scene (suppresses terrain and parcel info loading).\n"
@@ -500,7 +514,7 @@ namespace OpenSim
500 if (alert != null) 514 if (alert != null)
501 presence.ControllingClient.Kick(alert); 515 presence.ControllingClient.Kick(alert);
502 else 516 else
503 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 517 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
504 518
505 presence.Scene.CloseAgent(presence.UUID, force); 519 presence.Scene.CloseAgent(presence.UUID, force);
506 break; 520 break;
@@ -1028,15 +1042,25 @@ namespace OpenSim
1028 cdt.AddColumn("Circuit code", 12); 1042 cdt.AddColumn("Circuit code", 12);
1029 cdt.AddColumn("Endpoint", 23); 1043 cdt.AddColumn("Endpoint", 23);
1030 cdt.AddColumn("Active?", 7); 1044 cdt.AddColumn("Active?", 7);
1045 cdt.AddColumn("ChildAgent?", 7);
1046 cdt.AddColumn("ping(ms)", 8);
1031 1047
1032 SceneManager.ForEachScene( 1048 SceneManager.ForEachScene(
1033 s => s.ForEachClient( 1049 s => s.ForEachClient(
1034 c => cdt.AddRow( 1050 c =>
1035 s.Name, 1051 {
1036 c.Name, 1052 bool child = false;
1037 c.CircuitCode.ToString(), 1053 if(c.SceneAgent != null && c.SceneAgent.IsChildAgent)
1038 c.RemoteEndPoint.ToString(), 1054 child = true;
1039 c.IsActive.ToString()))); 1055 cdt.AddRow(
1056 s.Name,
1057 c.Name,
1058 c.CircuitCode.ToString(),
1059 c.RemoteEndPoint.ToString(),
1060 c.IsActive.ToString(),
1061 child.ToString(),
1062 c.PingTimeMS);
1063 }));
1040 1064
1041 MainConsole.Instance.Output(cdt.ToString()); 1065 MainConsole.Instance.Output(cdt.ToString());
1042 } 1066 }
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(