From c91753c065ec67491b94386b06d742a328ccffd4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 2 Mar 2013 00:56:53 +0000 Subject: minor: Log number of region modules loaded from each plugin --- .../RegionModulesControllerPlugin.cs | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 633d005..510be37 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -85,16 +85,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController if (modulesConfig == null) modulesConfig = m_openSim.ConfigSource.Source.AddConfig("Modules"); + Dictionary> loadedModules = new Dictionary>(); + // Scan modules and load all that aren't disabled foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) { + IList loadedModuleData; + + if (!loadedModules.ContainsKey(node.Addin)) + loadedModules.Add(node.Addin, new List { 0, 0, 0 }); + + loadedModuleData = loadedModules[node.Addin]; + if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) { if (CheckModuleEnabled(node, modulesConfig)) { m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); m_sharedModules.Add(node); + loadedModuleData[0]++; } } else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) @@ -103,14 +113,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController { m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); m_nonSharedModules.Add(node); + loadedModuleData[1]++; } } else { - m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); + m_log.WarnFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); + loadedModuleData[2]++; } } + foreach (KeyValuePair> loadedModuleData in loadedModules) + { + m_log.InfoFormat( + "[REGIONMODULES]: From plugin {0}, (version {1}), loaded {2} modules, {3} shared, {4} non-shared {5} unknown", + loadedModuleData.Key.Id, + loadedModuleData.Key.Version, + loadedModuleData.Value[0] + loadedModuleData.Value[1] + loadedModuleData.Value[2], + loadedModuleData.Value[0], loadedModuleData.Value[1], loadedModuleData.Value[2]); + } + // Load and init the module. We try a constructor with a port // if a port was given, fall back to one without if there is // no port or the more specific constructor fails. -- cgit v1.1 From 1a98ce5f6480c65ae30db933941f1a0184b5bc84 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 2 Mar 2013 01:06:08 +0000 Subject: minor: Quieten down the parts of the WebSocketEcho module logging for now where it tells us it is added/loaded/removed from regions --- .../Example/WebSocketEchoTest/WebSocketEchoModule.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs index 112ba4e..5bf0ed4 100644 --- a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs +++ b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs @@ -45,6 +45,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule public class WebSocketEchoModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private bool enabled; public string Name { get { return "WebSocketEchoModule"; } } @@ -55,9 +56,9 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule public void Initialise(IConfigSource pConfig) { - enabled =(pConfig.Configs["WebSocketEcho"] != null); - if (enabled) - m_log.DebugFormat("[WebSocketEchoModule]: INITIALIZED MODULE"); + enabled = (pConfig.Configs["WebSocketEcho"] != null); +// if (enabled) +// m_log.DebugFormat("[WebSocketEchoModule]: INITIALIZED MODULE"); } /// @@ -158,17 +159,17 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule public void AddRegion(Scene scene) { - m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} ADDED", scene.RegionInfo.RegionName); +// m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} ADDED", scene.RegionInfo.RegionName); } public void RemoveRegion(Scene scene) { - m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} REMOVED", scene.RegionInfo.RegionName); +// m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} REMOVED", scene.RegionInfo.RegionName); } public void RegionLoaded(Scene scene) { - m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} LOADED", scene.RegionInfo.RegionName); +// m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} LOADED", scene.RegionInfo.RegionName); } } } \ No newline at end of file -- cgit v1.1 From 4999d7920a63af99c6bba53134d4c0e891b99573 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 2 Mar 2013 01:23:01 +0000 Subject: Revert "Removed more vars from [Startup]. I think these were already moved elsewhere, because I can't find any reference to them in the code." This reverts commit efa722786509bd8e02e23f11da974b4282dbd185. --- bin/OpenSim.ini.example | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 0eb43a2..16e314b 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -256,6 +256,26 @@ ;; default is false ; TelehubAllowLandmark = false + ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} + ;; Bar (|) separated list of viewers which may gain access to the regions. + ;; One can use a substring of the viewer name to enable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has access + ;; - "Imprudence 1.3" has access + ;; - "Imprudence 1.3.1" has no access + ; AllowedViewerList = + + ;# {BannedClients} {} {Bar (|) separated list of banned clients} {} + ;# Bar (|) separated list of viewers which may not gain access to the regions. + ;; One can use a Substring of the viewer name to disable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has no access + ;; - "Imprudence 1.3" has no access + ;; - "Imprudence 1.3.1" has access + ; BannedViewerList = + [Map] ;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true ;; Map tile options. -- cgit v1.1 From 1bc8692a999f4e80b90b9a1eb7c7428b2e74214e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 2 Mar 2013 01:43:54 +0000 Subject: Move AllowedClients and BannedClients section to new [AccessControl] section in OpenSim.ini from [Startup] This change also corrects the setting names - they were actually wrong (though the text in {} was correct). If there are settings in [Startup] they will continue to be used and anything there will override settings in [AccessControl] --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++++++-- bin/OpenSim.ini.example | 8 ++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5b61538..14dac7a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -932,7 +932,12 @@ namespace OpenSim.Region.Framework.Scenes } } - string grant = startupConfig.GetString("AllowedClients", String.Empty); + string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" }; + + string grant + = Util.GetConfigVarFromSections( + config, "AllowedClients", possibleAccessControlConfigSections, ""); + if (grant.Length > 0) { foreach (string viewer in grant.Split('|')) @@ -941,7 +946,10 @@ namespace OpenSim.Region.Framework.Scenes } } - grant = startupConfig.GetString("BannedClients", String.Empty); + grant + = Util.GetConfigVarFromSections( + config, "BannedClients", possibleAccessControlConfigSections, ""); + if (grant.Length > 0) { foreach (string viewer in grant.Split('|')) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 16e314b..eab1fce 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -256,6 +256,8 @@ ;; default is false ; TelehubAllowLandmark = false + +[AccessControl] ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} ;; Bar (|) separated list of viewers which may gain access to the regions. ;; One can use a substring of the viewer name to enable only certain @@ -264,7 +266,7 @@ ;; - "Imprudence" has access ;; - "Imprudence 1.3" has access ;; - "Imprudence 1.3.1" has no access - ; AllowedViewerList = + ; AllowedClients = ;# {BannedClients} {} {Bar (|) separated list of banned clients} {} ;# Bar (|) separated list of viewers which may not gain access to the regions. @@ -274,7 +276,8 @@ ;; - "Imprudence" has no access ;; - "Imprudence 1.3" has no access ;; - "Imprudence 1.3.1" has access - ; BannedViewerList = + ; BannedClients = + [Map] ;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true @@ -310,6 +313,7 @@ ;; got a large number of objects, so you can turn it off here if you'd like. ; DrawPrimOnMapTile = true + [Permissions] ;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule ;; Permission modules to use, separated by comma. -- cgit v1.1 From b47ffb5dc40418705bb16669e47130aeddeaec6c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 2 Mar 2013 13:02:02 -0800 Subject: Added existance and default value for [XEngine]MinTimerInterval to OpenSimDefaults.ini --- bin/OpenSimDefaults.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 091107f..417150a 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1400,6 +1400,10 @@ ; up the system to malicious scripters ; NotecardLineReadCharsMax = 255 + ; Minimum settable timer interval. Any timer setting less than this is + ; rounded up to this minimum interval. + ; MinTimerInterval = 0.5 + ; Sensor settings SensorMaxRange = 96.0 SensorMaxResults = 16 -- cgit v1.1