From 22f25dfcab4a5c0d4df0a3df74a6337ab80c5ee8 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 16 Jun 2012 03:32:47 +0100 Subject: [PATCH 01/18] 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 d2cd163eba..77dfcc6dd2 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 1b8a4b6446..ededdc054e 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. From ed513fc7bee7945a71ad9cb66d83ac68335a7774 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 16 Jun 2012 03:43:45 +0100 Subject: [PATCH 02/18] 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 --- .../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 299542103a..35a8dee169 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; From 7119de56ffb9c37b6baa57c5f30b81ac3f86c91c Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 16 Jun 2012 04:12:53 +0100 Subject: [PATCH 03/18] 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 77dfcc6dd2..61afc762e2 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() From 2ed768cbf5734f6b0c8825beecc4347bf9537f6f Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 16 Jun 2012 06:25:12 -0400 Subject: [PATCH 04/18] Adjust Robust*.ini.examples V3 webprofile entries --- bin/Robust.HG.ini.example | 14 +++++++++----- bin/Robust.ini.example | 10 +++++++--- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 9887ab5763..63a13d7fab 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -237,12 +237,16 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 WelcomeMessage = "Welcome, Avatar!" AllowRemoteSetLoginLevel = "false" - - ; For V2 map - MapTileURL = "http://127.0.0.1:8002"; - ; For WebProfiles (V3) - ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]" + ; For V2/3 Web Profiles + ; Work in progress: The ProfileServerURL/OpenIDServerURL are + ; being used in a development viewer as support for webprofiles + ; is being developed across the componets + ; + ; ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]" + ; + ; For V2/V3 webapp authentication SSO + ; OpenIDServerURL = "http://127.0.0.1/openid/openidserver/" ; If you run this login server behind a proxy, set this to true ; HasProxy = false diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index f70d13bd96..5a9d61341c 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -225,10 +225,14 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 MapTileURL = "http://127.0.0.1:8002"; ; For V2/3 Web Profiles - ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]" - + ; Work in progress: The ProfileServerURL/OpenIDServerURL are + ; being used in a development viewer as support for webprofiles + ; is being developed across the componets + ; + ; ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]" + ; ; For V2/V3 webapp authentication SSO - OpenIDServerURL = "http://127.0.0.1/openid/openidserver/" + ; OpenIDServerURL = "http://127.0.0.1/openid/openidserver/" ; If you run this login server behind a proxy, set this to true ; HasProxy = false From 5c5b359bcb80e8bdea2086cae117312541083787 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 16 Jun 2012 07:24:27 -0400 Subject: [PATCH 05/18] Oops! putting back the entry for map urls --- bin/Robust.HG.ini.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 63a13d7fab..3eecdd916f 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -238,6 +238,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 WelcomeMessage = "Welcome, Avatar!" AllowRemoteSetLoginLevel = "false" + ; For V2 map + MapTileURL = "http://127.0.0.1:8002"; + ; For V2/3 Web Profiles ; Work in progress: The ProfileServerURL/OpenIDServerURL are ; being used in a development viewer as support for webprofiles From 8e7032ece87d3e0e75f091ea84d482151e90795e Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 19 Jun 2012 01:53:50 +0100 Subject: [PATCH 06/18] minor: Add a little more detail to IOException logging in XEngine.SetXMLState() Also removes superflous Close() commands for statements taking place within using() constructs Also adds some comment out debug log messages for future use. --- .../Region/ScriptEngine/XEngine/XEngine.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index a9b6e6754f..35c338d25a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1743,6 +1743,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine public bool SetXMLState(UUID itemID, string xml) { +// m_log.DebugFormat("[XEngine]: Writing state for script item with ID {0}", itemID); + if (xml == String.Empty) return false; @@ -1803,14 +1805,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine { using (FileStream fs = File.Create(path)) { +// m_log.DebugFormat("[XEngine]: Writing assembly file {0}", path); + fs.Write(filedata, 0, filedata.Length); - fs.Close(); } } catch (IOException ex) { // if there already exists a file at that location, it may be locked. - m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", path, ex.Message); + m_log.ErrorFormat("[XEngine]: Error whilst writing assembly file {0}, {1}", path, ex.Message); } string textpath = path + ".text"; @@ -1820,16 +1823,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine { using (StreamWriter sw = new StreamWriter(fs)) { +// m_log.DebugFormat("[XEngine]: Writing .text file {0}", textpath); + sw.Write(base64); - sw.Close(); } - fs.Close(); } } catch (IOException ex) { // if there already exists a file at that location, it may be locked. - m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", textpath, ex.Message); + m_log.ErrorFormat("[XEngine]: Error whilst writing .text file {0}, {1}", textpath, ex.Message); } } } @@ -1843,16 +1846,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine { using (StreamWriter ssw = new StreamWriter(sfs)) { +// m_log.DebugFormat("[XEngine]: Writing state file {0}", statepath); + ssw.Write(stateE.OuterXml); - ssw.Close(); } - sfs.Close(); } } catch (IOException ex) { // if there already exists a file at that location, it may be locked. - m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", statepath, ex.Message); + m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message); } XmlNodeList mapL = rootE.GetElementsByTagName("LineMap"); @@ -1869,16 +1872,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine { using (StreamWriter msw = new StreamWriter(mfs)) { +// m_log.DebugFormat("[XEngine]: Writing linemap file {0}", mappath); + msw.Write(mapE.InnerText); - msw.Close(); } - mfs.Close(); } } catch (IOException ex) { // if there already exists a file at that location, it may be locked. - m_log.ErrorFormat("[XEngine]: File {0} already exists! {1}", mappath, ex.Message); + m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message); } } From ef686ead37f475ad9e16f637fe1efc41cfbbd6f4 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 19 Jun 2012 02:11:46 +0100 Subject: [PATCH 07/18] Like the assembly and text files, only write the c#-lsl linemap in XEngine.SetXMLState() if the trust binaries flag is set. This doesn't affect other locations where the map is written, such as on script compilation. --- .../Region/ScriptEngine/XEngine/XEngine.cs | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 35c338d25a..aedf2c1f25 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1835,6 +1835,33 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_log.ErrorFormat("[XEngine]: Error whilst writing .text file {0}, {1}", textpath, ex.Message); } } + + XmlNodeList mapL = rootE.GetElementsByTagName("LineMap"); + if (mapL.Count > 0) + { + XmlElement mapE = (XmlElement)mapL[0]; + + string mappath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); + mappath = Path.Combine(mappath, mapE.GetAttribute("Filename")); + + try + { + using (FileStream mfs = File.Create(mappath)) + { + using (StreamWriter msw = new StreamWriter(mfs)) + { + // m_log.DebugFormat("[XEngine]: Writing linemap file {0}", mappath); + + msw.Write(mapE.InnerText); + } + } + } + catch (IOException ex) + { + // if there already exists a file at that location, it may be locked. + m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message); + } + } } string statepath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); @@ -1858,33 +1885,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message); } - XmlNodeList mapL = rootE.GetElementsByTagName("LineMap"); - if (mapL.Count > 0) - { - XmlElement mapE = (XmlElement)mapL[0]; - - string mappath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString()); - mappath = Path.Combine(mappath, mapE.GetAttribute("Filename")); - - try - { - using (FileStream mfs = File.Create(mappath)) - { - using (StreamWriter msw = new StreamWriter(mfs)) - { -// m_log.DebugFormat("[XEngine]: Writing linemap file {0}", mappath); - - msw.Write(mapE.InnerText); - } - } - } - catch (IOException ex) - { - // if there already exists a file at that location, it may be locked. - m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message); - } - } - return true; } From e23d7ff9c0a2e4f106650359255f1fbe52abf21c Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 00:05:48 +0100 Subject: [PATCH 08/18] minor: If logging because mesh/sculpt data isn't present for an object, log object UUID rather than local id, since UUID doesn't potentially vary between simulator starts. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 7640fc04b8..9303ff4801 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1625,7 +1625,7 @@ namespace OpenSim.Region.Framework.Scenes else m_log.WarnFormat( "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data", - Name, LocalId, id); + Name, UUID, id); } /// From 9737e6d52eb7ebb815accca0a1b2f3fee381e680 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 00:07:03 +0100 Subject: [PATCH 09/18] If RegionReady is active, don't falsely say that logins are enabled in the main scene loop before RegionReady is signalled when initial script compilation finishes. Also raises this logging level to Info from Debug since this information is of high importance. This matches the behaviour of the RegionReady module --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1305d83018..385febf99d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1474,11 +1474,11 @@ namespace OpenSim.Region.Framework.Scenes LoginLock = false; EventManager.TriggerLoginsEnabled(RegionInfo.RegionName); } - m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); // For RegionReady lockouts - if(LoginLock == false) + if (!LoginLock) { + m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); LoginsDisabled = false; } From 0fa303b1cf244b3066395413e640318b2122c19f Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 00:10:19 +0100 Subject: [PATCH 10/18] Log how many scripts are candidates for starting and how many are actually started. Adds DebugLevel infrastructure to XEngine though currently commented out and unused. --- .../Framework/Interfaces/IEntityInventory.cs | 19 ++- .../Framework/Scenes/Scene.Inventory.cs | 21 +++- .../Scenes/SceneObjectGroup.Inventory.cs | 18 ++- .../Scenes/SceneObjectPartInventory.cs | 116 +++++++++--------- .../Region/ScriptEngine/XEngine/XEngine.cs | 64 +++++++++- 5 files changed, 169 insertions(+), 69 deletions(-) diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 4370fcc96f..1c9bdce832 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -81,7 +81,12 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Start all the scripts contained in this entity's inventory /// - void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource); + /// + /// + /// + /// + /// Number of scripts started. + int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource); ArrayList GetScriptErrors(UUID itemID); void ResumeScripts(); @@ -102,7 +107,11 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - void CreateScriptInstance( + /// + /// true if the script instance was valid for starting, false otherwise. This does not guarantee + /// that the script was actually started, just that the script was valid (i.e. its asset data could be found, etc.) + /// + bool CreateScriptInstance( TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource); /// @@ -113,7 +122,11 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource); + /// + /// true if the script instance was valid for starting, false otherwise. This does not guarantee + /// that the script was actually started, just that the script was valid (i.e. its asset data could be found, etc.) + /// + bool CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource); /// /// Stop a script which is in this prim's inventory. diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index b59fd05578..e4132817ac 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -60,19 +60,32 @@ namespace OpenSim.Region.Framework.Scenes /// /// Creates all the scripts in the scene which should be started. /// - public void CreateScriptInstances() + /// + /// Number of scripts that were valid for starting. This does not guarantee that all these scripts + /// were actually started, but just that the start could be attempt (e.g. the asset data for the script could be found) + /// + public int CreateScriptInstances() { - m_log.Info("[PRIM INVENTORY]: Creating scripts in scene"); + m_log.InfoFormat("[SCENE]: Initializing script instances in {0}", RegionInfo.RegionName); + + int scriptsValidForStarting = 0; EntityBase[] entities = Entities.GetEntities(); foreach (EntityBase group in entities) { if (group is SceneObjectGroup) { - ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); + scriptsValidForStarting + += ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); ((SceneObjectGroup) group).ResumeScripts(); } } + + m_log.InfoFormat( + "[SCENE]: Initialized {0} script instances in {1}", + scriptsValidForStarting, RegionInfo.RegionName); + + return scriptsValidForStarting; } /// @@ -80,7 +93,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void StartScripts() { - m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); + m_log.InfoFormat("[SCENE]: Starting scripts in {0}, please wait.", RegionInfo.RegionName); IScriptModule[] engines = RequestModuleInterfaces(); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 10012d016a..2866b546eb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -54,16 +54,28 @@ namespace OpenSim.Region.Framework.Scenes /// /// Start the scripts contained in all the prims in this group. /// - public void CreateScriptInstances(int startParam, bool postOnRez, - string engine, int stateSource) + /// + /// + /// + /// + /// + /// Number of scripts that were valid for starting. This does not guarantee that all these scripts + /// were actually started, but just that the start could be attempt (e.g. the asset data for the script could be found) + /// + public int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource) { + int scriptsStarted = 0; + // Don't start scripts if they're turned off in the region! if (!m_scene.RegionInfo.RegionSettings.DisableScripts) { SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) - parts[i].Inventory.CreateScriptInstances(startParam, postOnRez, engine, stateSource); + scriptsStarted + += parts[i].Inventory.CreateScriptInstances(startParam, postOnRez, engine, stateSource); } + + return scriptsStarted; } /// diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 8810903700..c223474f90 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -217,14 +217,16 @@ namespace OpenSim.Region.Framework.Scenes } } - /// - /// Start all the scripts contained in this prim's inventory - /// - public void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource) + public int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource) { + int scriptsValidForStarting = 0; + List scripts = GetInventoryItems(InventoryType.LSL); foreach (TaskInventoryItem item in scripts) - CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); + if (CreateScriptInstance(item, startParam, postOnRez, engine, stateSource)) + scriptsValidForStarting++; + + return scriptsValidForStarting; } public ArrayList GetScriptErrors(UUID itemID) @@ -264,61 +266,65 @@ namespace OpenSim.Region.Framework.Scenes /// Start a script which is in this prim's inventory. /// /// - /// - public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) + /// true if the script instance was created, false otherwise + public bool CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) { // m_log.DebugFormat("[PRIM INVENTORY]: Starting script {0} {1} in prim {2} {3} in {4}", // item.Name, item.ItemID, m_part.Name, m_part.UUID, m_part.ParentGroup.Scene.RegionInfo.RegionName); if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) - return; + return false; m_part.AddFlag(PrimFlags.Scripted); - if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts) + if (m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts) + return false; + + if (stateSource == 2 && // Prim crossing + m_part.ParentGroup.Scene.m_trustBinaries) { - if (stateSource == 2 && // Prim crossing - m_part.ParentGroup.Scene.m_trustBinaries) + lock (m_items) { - lock (m_items) - { - m_items[item.ItemID].PermsMask = 0; - m_items[item.ItemID].PermsGranter = UUID.Zero; - } - - m_part.ParentGroup.Scene.EventManager.TriggerRezScript( - m_part.LocalId, item.ItemID, String.Empty, startParam, postOnRez, engine, stateSource); - m_part.ParentGroup.AddActiveScriptCount(1); - m_part.ScheduleFullUpdate(); - return; + m_items[item.ItemID].PermsMask = 0; + m_items[item.ItemID].PermsGranter = UUID.Zero; + } + + m_part.ParentGroup.Scene.EventManager.TriggerRezScript( + m_part.LocalId, item.ItemID, String.Empty, startParam, postOnRez, engine, stateSource); + m_part.ParentGroup.AddActiveScriptCount(1); + m_part.ScheduleFullUpdate(); + return true; + } + + AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString()); + if (null == asset) + { + m_log.ErrorFormat( + "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", + item.Name, item.ItemID, m_part.AbsolutePosition, + m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); + + return false; + } + else + { + if (m_part.ParentGroup.m_savedScriptState != null) + item.OldItemID = RestoreSavedScriptState(item.LoadedItemID, item.OldItemID, item.ItemID); + + lock (m_items) + { + m_items[item.ItemID].OldItemID = item.OldItemID; + m_items[item.ItemID].PermsMask = 0; + m_items[item.ItemID].PermsGranter = UUID.Zero; } - AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString()); - if (null == asset) - { - m_log.ErrorFormat( - "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", - item.Name, item.ItemID, m_part.AbsolutePosition, - m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); - } - else - { - if (m_part.ParentGroup.m_savedScriptState != null) - item.OldItemID = RestoreSavedScriptState(item.LoadedItemID, item.OldItemID, item.ItemID); + string script = Utils.BytesToString(asset.Data); + m_part.ParentGroup.Scene.EventManager.TriggerRezScript( + m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); + m_part.ParentGroup.AddActiveScriptCount(1); + m_part.ScheduleFullUpdate(); - lock (m_items) - { - m_items[item.ItemID].OldItemID = item.OldItemID; - m_items[item.ItemID].PermsMask = 0; - m_items[item.ItemID].PermsGranter = UUID.Zero; - } - - string script = Utils.BytesToString(asset.Data); - m_part.ParentGroup.Scene.EventManager.TriggerRezScript( - m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); - m_part.ParentGroup.AddActiveScriptCount(1); - m_part.ScheduleFullUpdate(); - } + return true; } } @@ -384,22 +390,22 @@ namespace OpenSim.Region.Framework.Scenes return stateID; } - /// - /// Start a script which is in this prim's inventory. - /// - /// - /// A - /// - public void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource) + public bool CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource) { TaskInventoryItem item = GetInventoryItem(itemId); if (item != null) - CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); + { + return CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); + } else + { m_log.ErrorFormat( "[PRIM INVENTORY]: Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", itemId, m_part.Name, m_part.UUID, m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); + + return false; + } } /// diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index aedf2c1f25..3f623de3b2 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -62,6 +62,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// + /// Control the printing of certain debug messages. + /// + /// + /// If DebugLevel >= 1, then we log every time that a script is started. + /// +// public int DebugLevel { get; set; } + private SmartThreadPool m_ThreadPool; private int m_MaxScriptQueue; private Scene m_Scene; @@ -216,9 +224,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve; - m_log.InfoFormat("[XEngine] Initializing scripts in region {0}", - scene.RegionInfo.RegionName); m_Scene = scene; + m_log.InfoFormat("[XEngine]: Initializing scripts in region {0}", m_Scene.RegionInfo.RegionName); m_MinThreads = m_ScriptConfig.GetInt("MinThreads", 2); m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100); @@ -321,8 +328,41 @@ namespace OpenSim.Region.ScriptEngine.XEngine "Starts all stopped scripts." + "If a is given then only that script will be started. Otherwise, all suitable scripts are started.", (module, cmdparams) => HandleScriptsAction(cmdparams, HandleStartScript)); + +// MainConsole.Instance.Commands.AddCommand( +// "Debug", false, "debug xengine", "debug xengine []", +// "Turn on detailed xengine debugging.", +// "If level <= 0, then no extra logging is done.\n" +// + "If level >= 1, then we log every time that a script is started.", +// HandleDebugLevelCommand); } + /// + /// Change debug level + /// + /// + /// +// private void HandleDebugLevelCommand(string module, string[] args) +// { +// if (args.Length == 3) +// { +// int newDebug; +// if (int.TryParse(args[2], out newDebug)) +// { +// DebugLevel = newDebug; +// MainConsole.Instance.OutputFormat("Debug level set to {0}", newDebug); +// } +// } +// else if (args.Length == 2) +// { +// MainConsole.Instance.OutputFormat("Current debug level is {0}", DebugLevel); +// } +// else +// { +// MainConsole.Instance.Output("Usage: debug xengine 0..1"); +// } +// } + /// /// Parse the raw item id into a script instance from the command params if it's present. /// @@ -825,8 +865,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine } object[] o; + + int scriptsStarted = 0; + while (m_CompileQueue.Dequeue(out o)) - DoOnRezScript(o); + { + if (DoOnRezScript(o)) + { + scriptsStarted++; + +// if (scriptsStarted % 50 == 0) +// m_log.DebugFormat( +// "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); + } + } + + m_log.DebugFormat( + "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); // NOTE: Despite having a lockless queue, this lock is required // to make sure there is never no compile thread while there @@ -1066,7 +1121,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine part.ParentGroup.RootPart.Name, item.Name, startParam, postOnRez, stateSource, m_MaxScriptQueue); - + +// if (DebugLevel >= 1) m_log.DebugFormat( "[XEngine] Loaded script {0}.{1}, item UUID {2}, prim UUID {3} @ {4}.{5}", part.ParentGroup.RootPart.Name, item.Name, itemID, part.UUID, From 881e92a7260a5823867b8f93b88c1b706a13cb56 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 00:19:50 +0100 Subject: [PATCH 11/18] Raise some IO associated Exception logging in XEngine to error level, in line with other similar cases. Remove more unnecessary Close() calls - these are being triggered by the Dispose() called when exiting the using statement for these sdk io objects. --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 3f623de3b2..35b58ee195 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1715,14 +1715,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine FileMode.Open, FileAccess.Read)) { tfs.Read(tdata, 0, tdata.Length); - tfs.Close(); } assem = new System.Text.ASCIIEncoding().GetString(tdata); } catch (Exception e) { - m_log.DebugFormat("[XEngine]: Unable to open script textfile {0}, reason: {1}", assemName+".text", e.Message); + m_log.ErrorFormat( + "[XEngine]: Unable to open script textfile {0}{1}, reason: {2}", + assemName, ".text", e.Message); } } } @@ -1739,16 +1740,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read)) { fs.Read(data, 0, data.Length); - fs.Close(); } assem = System.Convert.ToBase64String(data); } catch (Exception e) { - m_log.DebugFormat("[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message); + m_log.ErrorFormat( + "[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message); } - } } @@ -1761,9 +1761,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine using (StreamReader msr = new StreamReader(mfs)) { map = msr.ReadToEnd(); - msr.Close(); } - mfs.Close(); } } From 625e5e913a52b26f9af343d6c5bb33c3f8a4ead8 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 00:24:39 +0100 Subject: [PATCH 12/18] Comment out recently added log message detailing number of scripts started when compile queue empties for now --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 35b58ee195..e961e76b6c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -880,8 +880,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine } } - m_log.DebugFormat( - "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); +// m_log.DebugFormat( +// "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); // NOTE: Despite having a lockless queue, this lock is required // to make sure there is never no compile thread while there From 6b3f9fcde00c9581e5d4f74df2b21ff6bd303f63 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 00:42:54 +0100 Subject: [PATCH 13/18] Comment out the neighbour and land in connectors from info logging that they are starting up --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 2 +- .../ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs | 2 +- .../Neighbour/NeighbourServiceInConnectorModule.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 06a8021b5f..88c3ebbe01 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -320,7 +320,7 @@ namespace OpenSim.Framework.Servers TimeSpan timeTaken = DateTime.Now - m_startuptime; - m_log.InfoFormat("[STARTUP]: Startup took {0}m {1}s", timeTaken.Minutes, timeTaken.Seconds); +// m_log.InfoFormat("[STARTUP]: Startup took {0}m {1}s", timeTaken.Minutes, timeTaken.Seconds); } /// diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index c8f45f69b9..2f3c350c52 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land if (!m_Enabled) return; - m_log.Info("[LAND IN CONNECTOR]: Starting..."); +// m_log.Info("[LAND IN CONNECTOR]: Starting..."); } public void Close() diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs index 3fd89b9b24..b544ab3be5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs @@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour if (!m_Enabled) return; - m_log.Info("[NEIGHBOUR IN CONNECTOR]: Starting..."); +// m_log.Info("[NEIGHBOUR IN CONNECTOR]: Starting..."); } public void Close() From 4cfaa01c0a5e36f4414141a38541067460121a9b Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 01:06:55 +0100 Subject: [PATCH 14/18] Remove STARTUP COMPLETE message from the startuplogo.txt file and into main logging --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 4 +++- bin/startuplogo.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 88c3ebbe01..62ea9e3cc5 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -320,7 +320,9 @@ namespace OpenSim.Framework.Servers TimeSpan timeTaken = DateTime.Now - m_startuptime; -// m_log.InfoFormat("[STARTUP]: Startup took {0}m {1}s", timeTaken.Minutes, timeTaken.Seconds); + m_log.InfoFormat( + "[STARTUP]: Non-script portion of startup took {0}m {1}s. PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS.", + timeTaken.Minutes, timeTaken.Seconds); } /// diff --git a/bin/startuplogo.txt b/bin/startuplogo.txt index 0d11e7725e..e69de29bb2 100644 --- a/bin/startuplogo.txt +++ b/bin/startuplogo.txt @@ -1 +0,0 @@ -STARTUP COMPLETE From 7b6c0232a54c4c083e16c028fd475121b20b8bff Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 01:10:18 +0100 Subject: [PATCH 15/18] Change default logging level for XEngine to WARN instead of DEBUG. This is to reduce log spam from script loading, which is especially spammy for avatar movements with scripted attachments. All important messages are at warn or above. If you still want/need to see these messages, set in the section of OpenSim.exe.config. This affects no other package logs, which still output at the root configured level (currently DEBUG by default). --- bin/OpenSim.exe.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/OpenSim.exe.config b/bin/OpenSim.exe.config index 4a49fc5631..f1e3709688 100755 --- a/bin/OpenSim.exe.config +++ b/bin/OpenSim.exe.config @@ -31,5 +31,10 @@ + + + + + From 6c312bce7f12efa856ad0e86662c4cffc56a1e75 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 01:28:55 +0100 Subject: [PATCH 16/18] minor: Lower flotsam asset cache warning about not having a FlotsamCache.ini to debug It's perfectly okay not to have this section. --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index dd6026bd93..fab489dbd4 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -143,7 +143,7 @@ namespace Flotsam.RegionModules.AssetCache IConfig assetConfig = source.Configs["AssetCache"]; if (assetConfig == null) { - m_log.Warn( + m_log.Debug( "[FLOTSAM ASSET CACHE]: AssetCache section missing from config (not copied config-include/FlotsamCache.ini.example? Using defaults."); } else From 9ec9dafae6d8de93332c510ee7fa0159059dd983 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 01:33:25 +0100 Subject: [PATCH 17/18] Lower warn logging on not having friends/group module on permissions to debug. It's a valid configuration not to have these modules, but I think it's still worth logging the fact that certain permissions won't work (always return true) --- .../Region/CoreModules/World/Permissions/PermissionsModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 4f72463b7c..7a8a57c833 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -348,12 +348,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_friendsModule = m_scene.RequestModuleInterface(); if (m_friendsModule == null) - m_log.Warn("[PERMISSIONS]: Friends module not found, friend permissions will not work"); + m_log.Debug("[PERMISSIONS]: Friends module not found, friend permissions will not work"); m_groupsModule = m_scene.RequestModuleInterface(); if (m_groupsModule == null) - m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); + m_log.Debug("[PERMISSIONS]: Groups module not found, group permissions will not work"); m_moapModule = m_scene.RequestModuleInterface(); From b23425c7c499d423235a724bc10c2cccc823132c Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Jun 2012 02:26:58 +0100 Subject: [PATCH 18/18] As with LLSDInventoryItem from commit 01a2b0b, send type values in LLSDInventoryFolder for inventory CAPs as integers rather than strings. Should also resolve some issues with exceptions being thrown in some inventory fetches. --- .../WebFetchInvDescHandler.cs | 8 ++------ OpenSim/Capabilities/LLSDInventoryFolder.cs | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index 849cad2115..515637eac0 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs @@ -393,12 +393,8 @@ namespace OpenSim.Capabilities.Handlers llsdFolder.folder_id = invFolder.ID; llsdFolder.parent_id = invFolder.ParentID; llsdFolder.name = invFolder.Name; - - if (invFolder.Type == (short)AssetType.Unknown || !Enum.IsDefined(typeof(AssetType), (sbyte)invFolder.Type)) - llsdFolder.type = "-1"; - else - llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type); - llsdFolder.preferred_type = "-1"; + llsdFolder.type = invFolder.Type; + llsdFolder.preferred_type = -1; return llsdFolder; } diff --git a/OpenSim/Capabilities/LLSDInventoryFolder.cs b/OpenSim/Capabilities/LLSDInventoryFolder.cs index 3c216e9c15..d085430e8a 100644 --- a/OpenSim/Capabilities/LLSDInventoryFolder.cs +++ b/OpenSim/Capabilities/LLSDInventoryFolder.cs @@ -35,7 +35,7 @@ namespace OpenSim.Framework.Capabilities public UUID folder_id; public UUID parent_id; public string name; - public string type; - public string preferred_type; + public int type; + public int preferred_type; } }