In llRequestInventoryData() 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-safe0.7.3-extended
parent
3436be2046
commit
e8a0ec1287
|
@ -4009,9 +4009,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
TaskInventoryDictionary itemDictionary = (TaskInventoryDictionary)m_host.TaskInventory.Clone();
|
foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems())
|
||||||
|
|
||||||
foreach (TaskInventoryItem item in itemDictionary.Values)
|
|
||||||
{
|
{
|
||||||
if (item.Type == 3 && item.Name == name)
|
if (item.Type == 3 && item.Name == name)
|
||||||
{
|
{
|
||||||
|
@ -4043,6 +4041,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return tid.ToString();
|
return tid.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptSleep(1000);
|
ScriptSleep(1000);
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue