From 29aaf5564f52c0c532910764e4218eb6891184ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 11 Sep 2015 09:48:51 -0700 Subject: Mantis #7720: AssetXferUploader was setting AssetID to UUID.Zero. Before that wouldn't matter (item would be a terminal object) but with the introduction of the item cache, it matters, because the object in the cache was being modified to have AssetID=UUID.Zero. Also keeping the item cache consistent when item properties change. --- .../Connectors/Inventory/XInventoryServicesConnector.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index f235446..7cecd93 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs @@ -474,7 +474,13 @@ namespace OpenSim.Services.Connectors { "CreationDate", item.CreationDate.ToString() } }); - return CheckReturn(ret); + bool result = CheckReturn(ret); + if (result) + { + m_ItemCache.AddOrUpdate(item.ID, item, CACHE_EXPIRATION_SECONDS); + } + + return result; } public bool MoveItems(UUID principalID, List items) @@ -518,7 +524,9 @@ namespace OpenSim.Services.Connectors { InventoryItemBase retrieved = null; if (m_ItemCache.TryGetValue(item.ID, out retrieved)) + { return retrieved; + } try { -- cgit v1.1