From 4b2b14dad12d5a8f64609e7eeb3da62a5ca2f8b1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 4 Jul 2012 21:22:43 +0100 Subject: In llMessageLinked() use GetInventoryItems() rather than cloning TaskInventory directory GetInventoryItems() returns a new list and so is equivalent, and creates this list under lock whereas Clone() is not thread-safe --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 66d99a2..f57f752 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4116,7 +4116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return tid.ToString(); } } - + ScriptSleep(1000); return String.Empty; } @@ -4333,9 +4333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID partItemID; foreach (SceneObjectPart part in parts) { - TaskInventoryDictionary itemsDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone(); - - foreach (TaskInventoryItem item in itemsDictionary.Values) + foreach (TaskInventoryItem item in part.Inventory.GetInventoryItems()) { if (item.Type == ScriptBaseClass.INVENTORY_SCRIPT) { -- cgit v1.1