diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 30 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 71 | ||||
-rw-r--r-- | OpenSim/Region/Application/RegionApplicationBase.cs | 26 |
4 files changed, 111 insertions, 17 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..a2ba8c0 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -114,8 +114,8 @@ namespace OpenSim | |||
114 | if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) | 114 | if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) |
115 | Util.FireAndForgetMethod = asyncCallMethod; | 115 | Util.FireAndForgetMethod = asyncCallMethod; |
116 | 116 | ||
117 | stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15); | 117 | stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 ); |
118 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 300); | 118 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25); |
119 | m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); | 119 | m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); |
120 | } | 120 | } |
121 | 121 | ||
@@ -272,7 +272,7 @@ namespace OpenSim | |||
272 | + " [--force-terrain] [--force-parcels]" | 272 | + " [--force-terrain] [--force-parcels]" |
273 | + " [--no-objects]" | 273 | + " [--no-objects]" |
274 | + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]" | 274 | + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]" |
275 | + " [--displacement \"<x,y,z>\"]" | 275 | + " [--displacement \"<x,y,z>\"]" |
276 | + " [<OAR path>]", | 276 | + " [<OAR path>]", |
277 | "Load a region's data from an OAR archive.", | 277 | "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" | 278 | "--merge will merge the OAR with the existing scene (suppresses terrain and parcel info loading).\n" |
@@ -500,7 +500,7 @@ namespace OpenSim | |||
500 | if (alert != null) | 500 | if (alert != null) |
501 | presence.ControllingClient.Kick(alert); | 501 | presence.ControllingClient.Kick(alert); |
502 | else | 502 | else |
503 | presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); | 503 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); |
504 | 504 | ||
505 | presence.Scene.CloseAgent(presence.UUID, force); | 505 | presence.Scene.CloseAgent(presence.UUID, force); |
506 | break; | 506 | break; |
@@ -1028,15 +1028,25 @@ namespace OpenSim | |||
1028 | cdt.AddColumn("Circuit code", 12); | 1028 | cdt.AddColumn("Circuit code", 12); |
1029 | cdt.AddColumn("Endpoint", 23); | 1029 | cdt.AddColumn("Endpoint", 23); |
1030 | cdt.AddColumn("Active?", 7); | 1030 | cdt.AddColumn("Active?", 7); |
1031 | cdt.AddColumn("ChildAgent?", 7); | ||
1032 | cdt.AddColumn("ping(ms)", 8); | ||
1031 | 1033 | ||
1032 | SceneManager.ForEachScene( | 1034 | SceneManager.ForEachScene( |
1033 | s => s.ForEachClient( | 1035 | s => s.ForEachClient( |
1034 | c => cdt.AddRow( | 1036 | c => |
1035 | s.Name, | 1037 | { |
1036 | c.Name, | 1038 | bool child = false; |
1037 | c.CircuitCode.ToString(), | 1039 | if(c.SceneAgent != null && c.SceneAgent.IsChildAgent) |
1038 | c.RemoteEndPoint.ToString(), | 1040 | child = true; |
1039 | c.IsActive.ToString()))); | 1041 | cdt.AddRow( |
1042 | s.Name, | ||
1043 | c.Name, | ||
1044 | c.CircuitCode.ToString(), | ||
1045 | c.RemoteEndPoint.ToString(), | ||
1046 | c.IsActive.ToString(), | ||
1047 | child.ToString(), | ||
1048 | c.PingTimeMS); | ||
1049 | })); | ||
1040 | 1050 | ||
1041 | MainConsole.Instance.Output(cdt.ToString()); | 1051 | MainConsole.Instance.Output(cdt.ToString()); |
1042 | } | 1052 | } |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index ab6f036..41966ff 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -110,6 +110,10 @@ namespace OpenSim | |||
110 | 110 | ||
111 | public List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 111 | public List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
112 | 112 | ||
113 | private List<string> m_permsModules; | ||
114 | |||
115 | private bool m_securePermissionsLoading = true; | ||
116 | |||
113 | /// <value> | 117 | /// <value> |
114 | /// The config information passed into the OpenSimulator region server. | 118 | /// The config information passed into the OpenSimulator region server. |
115 | /// </value> | 119 | /// </value> |
@@ -219,6 +223,14 @@ namespace OpenSim | |||
219 | CreatePIDFile(pidFile); | 223 | CreatePIDFile(pidFile); |
220 | 224 | ||
221 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 225 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
226 | |||
227 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | ||
228 | |||
229 | string permissionModules = Util.GetConfigVarFromSections<string>(Config, "permissionmodules", | ||
230 | new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); | ||
231 | |||
232 | m_permsModules = new List<string>(permissionModules.Split(',')); | ||
233 | |||
222 | managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty); | 234 | managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty); |
223 | } | 235 | } |
224 | 236 | ||
@@ -410,7 +422,32 @@ namespace OpenSim | |||
410 | } | 422 | } |
411 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); | 423 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); |
412 | 424 | ||
425 | if (m_securePermissionsLoading) | ||
426 | { | ||
427 | foreach (string s in m_permsModules) | ||
428 | { | ||
429 | if (!scene.RegionModules.ContainsKey(s)) | ||
430 | { | ||
431 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
432 | Environment.Exit(0); | ||
433 | } | ||
434 | } | ||
435 | |||
436 | m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray())); | ||
437 | } | ||
438 | |||
413 | scene.SetModuleInterfaces(); | 439 | scene.SetModuleInterfaces(); |
440 | // First Step of bootreport sequence | ||
441 | if (scene.SnmpService != null) | ||
442 | { | ||
443 | scene.SnmpService.ColdStart(1,scene); | ||
444 | scene.SnmpService.LinkDown(scene); | ||
445 | } | ||
446 | |||
447 | if (scene.SnmpService != null) | ||
448 | { | ||
449 | scene.SnmpService.BootInfo("Loading prins", scene); | ||
450 | } | ||
414 | 451 | ||
415 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | 452 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) |
416 | SetUpEstateOwner(scene); | 453 | SetUpEstateOwner(scene); |
@@ -424,6 +461,11 @@ namespace OpenSim | |||
424 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 461 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
425 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 462 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
426 | 463 | ||
464 | if (scene.SnmpService != null) | ||
465 | { | ||
466 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | ||
467 | } | ||
468 | |||
427 | try | 469 | try |
428 | { | 470 | { |
429 | scene.RegisterRegionWithGrid(); | 471 | scene.RegisterRegionWithGrid(); |
@@ -434,15 +476,29 @@ namespace OpenSim | |||
434 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | 476 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", |
435 | e.Message, e.StackTrace); | 477 | e.Message, e.StackTrace); |
436 | 478 | ||
479 | if (scene.SnmpService != null) | ||
480 | { | ||
481 | scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); | ||
482 | } | ||
437 | // Carrying on now causes a lot of confusion down the | 483 | // Carrying on now causes a lot of confusion down the |
438 | // line - we need to get the user's attention | 484 | // line - we need to get the user's attention |
439 | Environment.Exit(1); | 485 | Environment.Exit(1); |
440 | } | 486 | } |
441 | 487 | ||
488 | if (scene.SnmpService != null) | ||
489 | { | ||
490 | scene.SnmpService.BootInfo("Grid Registration done", scene); | ||
491 | } | ||
492 | |||
442 | // We need to do this after we've initialized the | 493 | // We need to do this after we've initialized the |
443 | // scripting engines. | 494 | // scripting engines. |
444 | scene.CreateScriptInstances(); | 495 | scene.CreateScriptInstances(); |
445 | 496 | ||
497 | if (scene.SnmpService != null) | ||
498 | { | ||
499 | scene.SnmpService.BootInfo("ScriptEngine started", scene); | ||
500 | } | ||
501 | |||
446 | SceneManager.Add(scene); | 502 | SceneManager.Add(scene); |
447 | 503 | ||
448 | //if (m_autoCreateClientStack) | 504 | //if (m_autoCreateClientStack) |
@@ -454,10 +510,20 @@ namespace OpenSim | |||
454 | // } | 510 | // } |
455 | //} | 511 | //} |
456 | 512 | ||
513 | if (scene.SnmpService != null) | ||
514 | { | ||
515 | scene.SnmpService.BootInfo("Initializing region modules", scene); | ||
516 | } | ||
457 | scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; | 517 | scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; |
458 | 518 | ||
459 | mscene = scene; | 519 | mscene = scene; |
460 | 520 | ||
521 | if (scene.SnmpService != null) | ||
522 | { | ||
523 | scene.SnmpService.BootInfo("The region is operational", scene); | ||
524 | scene.SnmpService.LinkUp(scene); | ||
525 | } | ||
526 | |||
461 | //return clientServers; | 527 | //return clientServers; |
462 | } | 528 | } |
463 | 529 | ||
@@ -573,6 +639,11 @@ namespace OpenSim | |||
573 | private void ShutdownRegion(Scene scene) | 639 | private void ShutdownRegion(Scene scene) |
574 | { | 640 | { |
575 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); | 641 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); |
642 | if (scene.SnmpService != null) | ||
643 | { | ||
644 | scene.SnmpService.BootInfo("The region is shutting down", scene); | ||
645 | scene.SnmpService.LinkDown(scene); | ||
646 | } | ||
576 | IRegionModulesController controller; | 647 | IRegionModulesController controller; |
577 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) | 648 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) |
578 | { | 649 | { |
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs index 08c8579..ba92fd6 100644 --- a/OpenSim/Region/Application/RegionApplicationBase.cs +++ b/OpenSim/Region/Application/RegionApplicationBase.cs | |||
@@ -87,17 +87,29 @@ namespace OpenSim | |||
87 | // "OOB" Server | 87 | // "OOB" Server |
88 | if (m_networkServersInfo.ssl_listener) | 88 | if (m_networkServersInfo.ssl_listener) |
89 | { | 89 | { |
90 | BaseHttpServer server = new BaseHttpServer( | 90 | if (!m_networkServersInfo.ssl_external) |
91 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | 91 | { |
92 | m_networkServersInfo.cert_pass); | 92 | BaseHttpServer server = new BaseHttpServer( |
93 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | ||
94 | m_networkServersInfo.cert_pass); | ||
93 | 95 | ||
94 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); | 96 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); |
95 | MainServer.AddHttpServer(server); | 97 | MainServer.AddHttpServer(server); |
96 | server.Start(); | 98 | server.Start(); |
99 | } | ||
100 | else | ||
101 | { | ||
102 | BaseHttpServer server = new BaseHttpServer( | ||
103 | m_networkServersInfo.https_port); | ||
104 | |||
105 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); | ||
106 | MainServer.AddHttpServer(server); | ||
107 | server.Start(); | ||
108 | } | ||
97 | } | 109 | } |
98 | 110 | ||
99 | base.StartupSpecific(); | 111 | base.StartupSpecific(); |
100 | } | 112 | } |
101 | 113 | ||
102 | } | 114 | } |
103 | } \ No newline at end of file | 115 | } |