aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
authorDiva Canto2014-05-22 10:16:01 -0700
committerDiva Canto2014-05-22 10:16:01 -0700
commitf7b2aa0f49f5eca0a58c20b903103d19742220e9 (patch)
treebbb85d7ec857b4f98ea66ca2ba33e4076f7f51c3 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
parentDon't trigger ItemUploaded when no item has been uploaded. (diff)
downloadopensim-SC-f7b2aa0f49f5eca0a58c20b903103d19742220e9.zip
opensim-SC-f7b2aa0f49f5eca0a58c20b903103d19742220e9.tar.gz
opensim-SC-f7b2aa0f49f5eca0a58c20b903103d19742220e9.tar.bz2
opensim-SC-f7b2aa0f49f5eca0a58c20b903103d19742220e9.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs9
1 files changed, 2 insertions, 7 deletions
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
774 (sbyte)AssetType.Object, 774 (sbyte)AssetType.Object,
775 Utils.StringToBytes(sceneObjectXml), 775 Utils.StringToBytes(sceneObjectXml),
776 sp.UUID); 776 sp.UUID);
777 m_scene.AssetService.Store(asset);
778 777
779 item.AssetID = asset.FullID; 778 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>();
780 item.Description = asset.Description;
781 item.Name = asset.Name;
782 item.AssetType = asset.Type;
783 item.InvType = (int)InventoryType.Object;
784 779
785 m_scene.InventoryService.UpdateItem(item); 780 invAccess.UpdateInventoryItemAsset(sp.UUID, item, asset);
786 781
787 // If the name of the object has been changed whilst attached then we want to update the inventory 782 // If the name of the object has been changed whilst attached then we want to update the inventory
788 // item in the viewer. 783 // item in the viewer.