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. --- .../CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules/Agent') diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 49a96f4..5143204 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs @@ -319,12 +319,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction m_asset.Description = item.Description; m_asset.Type = (sbyte)item.AssetType; - // We must always store the item at this point even if the asset hasn't finished uploading, in order - // to avoid a race condition when the appearance module retrieves the item to set the asset id in - // the AvatarAppearance structure. - item.AssetID = m_asset.FullID; - if (item.AssetID != UUID.Zero) + if (m_asset.FullID != UUID.Zero) + { + // We must always store the item at this point even if the asset hasn't finished uploading, in order + // to avoid a race condition when the appearance module retrieves the item to set the asset id in + // the AvatarAppearance structure. + item.AssetID = m_asset.FullID; m_Scene.InventoryService.UpdateItem(item); + } if (m_uploadState == UploadState.Complete) { -- cgit v1.1