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.

This commit is contained in:
Diva Canto
2015-09-11 09:48:51 -07:00
parent 45046858a1
commit 29aaf5564f
2 changed files with 16 additions and 6 deletions

View File

@@ -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)
{