* minor: remove unnecessary locking from SOP.GetInventoryItem()
parent
0b16f9eee2
commit
666626db6d
|
@ -43,9 +43,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
private string m_inventoryFileName = String.Empty;
|
private string m_inventoryFileName = String.Empty;
|
||||||
private int m_inventoryFileNameSerial = 0;
|
private int m_inventoryFileNameSerial = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serial count for inventory file , used to tell if inventory has changed
|
/// Serial count for inventory file , used to tell if inventory has changed
|
||||||
/// no need for this to be part of Database backup
|
/// no need for this to be part of Database backup
|
||||||
|
@ -56,9 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Holds in memory prim inventory
|
/// Holds in memory prim inventory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary();
|
protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tracks whether inventory has changed since the last persistent backup
|
/// Tracks whether inventory has changed since the last persistent backup
|
||||||
|
@ -345,21 +341,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="itemID"></param>
|
/// <param name="itemID"></param>
|
||||||
/// <returns>null if the item does not exist</returns>
|
/// <returns>null if the item does not exist</returns>
|
||||||
public TaskInventoryItem GetInventoryItem(LLUUID itemID)
|
public TaskInventoryItem GetInventoryItem(LLUUID itemId)
|
||||||
{
|
{
|
||||||
lock (m_taskInventory)
|
TaskInventoryItem item;
|
||||||
{
|
m_taskInventory.TryGetValue(itemId, out item);
|
||||||
if (m_taskInventory.ContainsKey(itemID))
|
|
||||||
{
|
return item;
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[PRIM INVENTORY]: Retrieved task inventory item {0}, {1} from prim {2}, {3}",
|
|
||||||
// m_taskInventory[itemID].Name, itemID, Name, UUID);
|
|
||||||
|
|
||||||
return m_taskInventory[itemID];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -367,7 +354,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The updated item. An item with the same id must already exist
|
/// <param name="item">The updated item. An item with the same id must already exist
|
||||||
/// in this prim's inventory.</param>
|
/// in this prim's inventory.</param>
|
||||||
/// <returns>false if the item did not exist, true if the update occurred succesfully</returns>
|
/// <returns>false if the item did not exist, true if the update occurred successfully</returns>
|
||||||
public bool UpdateInventoryItem(TaskInventoryItem item)
|
public bool UpdateInventoryItem(TaskInventoryItem item)
|
||||||
{
|
{
|
||||||
lock (m_taskInventory)
|
lock (m_taskInventory)
|
||||||
|
|
Loading…
Reference in New Issue