aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-04 21:22:43 +0100
committerJustin Clark-Casey (justincc)2012-07-04 21:22:43 +0100
commit4b2b14dad12d5a8f64609e7eeb3da62a5ca2f8b1 (patch)
treefacd9459fc44130cbd31ab360ca50fdbc38f804f /OpenSim
parentIn llRequestInventoryData() use GetInventoryItems() rather than cloning TaskI... (diff)
downloadopensim-SC_OLD-4b2b14dad12d5a8f64609e7eeb3da62a5ca2f8b1.zip
opensim-SC_OLD-4b2b14dad12d5a8f64609e7eeb3da62a5ca2f8b1.tar.gz
opensim-SC_OLD-4b2b14dad12d5a8f64609e7eeb3da62a5ca2f8b1.tar.bz2
opensim-SC_OLD-4b2b14dad12d5a8f64609e7eeb3da62a5ca2f8b1.tar.xz
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
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
1 files changed, 2 insertions, 4 deletions
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
4116 return tid.ToString(); 4116 return tid.ToString();
4117 } 4117 }
4118 } 4118 }
4119 4119
4120 ScriptSleep(1000); 4120 ScriptSleep(1000);
4121 return String.Empty; 4121 return String.Empty;
4122 } 4122 }
@@ -4333,9 +4333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4333 UUID partItemID; 4333 UUID partItemID;
4334 foreach (SceneObjectPart part in parts) 4334 foreach (SceneObjectPart part in parts)
4335 { 4335 {
4336 TaskInventoryDictionary itemsDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone(); 4336 foreach (TaskInventoryItem item in part.Inventory.GetInventoryItems())
4337
4338 foreach (TaskInventoryItem item in itemsDictionary.Values)
4339 { 4337 {
4340 if (item.Type == ScriptBaseClass.INVENTORY_SCRIPT) 4338 if (item.Type == ScriptBaseClass.INVENTORY_SCRIPT)
4341 { 4339 {