From f7b2aa0f49f5eca0a58c20b903103d19742220e9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 22 May 2014 10:16:01 -0700 Subject: Fixed a problem with detaching attachments in situations where the user's asset server is not the same as the simulator's asset server. Unfortunately this still continues to be wasteful -- new assets are created every time an attachment is detached, but the process of storing the new asset goes through the InventoryAccess module, which does all sorts of checks regarding the users' inventory. --- .../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index e9b2f4f..7333769 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -774,15 +774,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments (sbyte)AssetType.Object, Utils.StringToBytes(sceneObjectXml), sp.UUID); - m_scene.AssetService.Store(asset); - item.AssetID = asset.FullID; - item.Description = asset.Description; - item.Name = asset.Name; - item.AssetType = asset.Type; - item.InvType = (int)InventoryType.Object; + IInventoryAccessModule invAccess = m_scene.RequestModuleInterface(); - m_scene.InventoryService.UpdateItem(item); + invAccess.UpdateInventoryItemAsset(sp.UUID, item, asset); // If the name of the object has been changed whilst attached then we want to update the inventory // item in the viewer. -- cgit v1.1