From 22f25dfcab4a5c0d4df0a3df74a6337ab80c5ee8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 16 Jun 2012 03:32:47 +0100 Subject: 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. --- OpenSim/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 d2cd163..77dfcc6 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; @@ -107,6 +109,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 1b8a4b6..ededdc05 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1168,7 +1168,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. -- cgit v1.1 From ed513fc7bee7945a71ad9cb66d83ac68335a7774 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 16 Jun 2012 03:43:45 +0100 Subject: Fix bug introduced in commit c6e3752 (13 Jun 2012) where poll responses would always return OK even if some other status code had been set --- OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs index 2995421..35a8dee 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs @@ -129,9 +129,7 @@ namespace OpenSim.Framework.Servers.HttpServer OSHttpResponse response = new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext); - byte[] buffer - = server.DoHTTPGruntWork( - responsedata, new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext)); + byte[] buffer = server.DoHTTPGruntWork(responsedata, response); response.SendChunked = false; response.ContentLength64 = buffer.Length; -- cgit v1.1 From 7119de56ffb9c37b6baa57c5f30b81ac3f86c91c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 16 Jun 2012 04:12:53 +0100 Subject: Change read config paramter from max_urls_per_simulator to max_external_urls_per_simulator, which is what it was meant to be --- OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 77dfcc6..61afc76 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp IConfig llFunctionsConfig = config.Configs["LL-Functions"]; if (llFunctionsConfig != null) - m_TotalUrls = llFunctionsConfig.GetInt("max_urls_per_simulator", m_TotalUrls); + m_TotalUrls = llFunctionsConfig.GetInt("max_external_urls_per_simulator", m_TotalUrls); } public void PostInitialise() -- cgit v1.1