aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authormeta72010-08-11 14:30:09 -0700
committermeta72010-08-11 14:30:09 -0700
commit7aac4d650f1e9d8b5ac071872f28b39e83143ccf (patch)
tree6ed6c6dbc8b393e8fded0316b3db4da33ab6fb35 /OpenSim/Region/ScriptEngine
parentAdd some console debug to help fix a threadlock issue. (diff)
downloadopensim-SC_OLD-7aac4d650f1e9d8b5ac071872f28b39e83143ccf.zip
opensim-SC_OLD-7aac4d650f1e9d8b5ac071872f28b39e83143ccf.tar.gz
opensim-SC_OLD-7aac4d650f1e9d8b5ac071872f28b39e83143ccf.tar.bz2
opensim-SC_OLD-7aac4d650f1e9d8b5ac071872f28b39e83143ccf.tar.xz
Fix the llRemoveInventory recursive lock error (again)
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1486e2a..9bece31 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4200,25 +4200,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4200 { 4200 {
4201 m_host.AddScriptLPS(1); 4201 m_host.AddScriptLPS(1);
4202 4202
4203 List<TaskInventoryItem> inv;
4203 try 4204 try
4204 { 4205 {
4205 m_host.TaskInventory.LockItemsForRead(true); 4206 m_host.TaskInventory.LockItemsForRead(true);
4206 foreach (TaskInventoryItem item in m_host.TaskInventory.Values) 4207 inv = new List<TaskInventoryItem>(m_host.TaskInventory.Values);
4207 {
4208 if (item.Name == name)
4209 {
4210 if (item.ItemID == m_itemID)
4211 throw new ScriptDeleteException();
4212 else
4213 m_host.Inventory.RemoveInventoryItem(item.ItemID);
4214 return;
4215 }
4216 }
4217 } 4208 }
4218 finally 4209 finally
4219 { 4210 {
4220 m_host.TaskInventory.LockItemsForRead(false); 4211 m_host.TaskInventory.LockItemsForRead(false);
4221 } 4212 }
4213 foreach (TaskInventoryItem item in inv)
4214 {
4215 if (item.Name == name)
4216 {
4217 if (item.ItemID == m_itemID)
4218 throw new ScriptDeleteException();
4219 else
4220 m_host.Inventory.RemoveInventoryItem(item.ItemID);
4221 return;
4222 }
4223 }
4222 } 4224 }
4223 4225
4224 public void llSetText(string text, LSL_Vector color, double alpha) 4226 public void llSetText(string text, LSL_Vector color, double alpha)