From 02a163848cfd1d1b775a6698cb7d8ea894b0f37b Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 16 Jun 2012 03:32:47 +0100 Subject: [PATCH] Implement max_external_urls_per_simulator setting in [LL-Functions] to allow configuration of how many urls can be set up by llRequestURL() Defaults remains as 100. This setting is per simulator instead of per region due to how the url script module is structured. --- .../Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 9 ++++++++- bin/OpenSimDefaults.ini | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 93e75b3622..50b04b5c9e 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -76,7 +76,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp private Dictionary m_UrlMap = new Dictionary(); - + /// + /// Maximum number of external urls that can be set up by this module. + /// private int m_TotalUrls = 100; private uint https_port = 0; @@ -103,6 +105,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp { https_port = (uint) config.Configs["Network"].GetInt("https_port",0); } + + IConfig llFunctionsConfig = config.Configs["LL-Functions"]; + + if (llFunctionsConfig != null) + m_TotalUrls = llFunctionsConfig.GetInt("max_urls_per_simulator", m_TotalUrls); } public void PostInitialise() diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index a23c65a471..9c9426ecc2 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1136,7 +1136,9 @@ ; Maximum number of llListen events we allow per script ; Set this to 0 to have no limit imposed. max_listens_per_script = 64 - + + ; Maximum number of external urls that scripts can set up in this simulator (e.g. via llRequestURL()) + max_external_urls_per_simulator = 100 [DataSnapshot] ; The following set of configs pertains to search.