diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 5e772e6e4a..c598748efb 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs @@ -31,6 +31,7 @@ using System.Reflection; using log4net; using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using PermissionMask = OpenSim.Framework.PermissionMask; @@ -376,6 +377,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction m_Scene.AssetService.Store(m_asset); m_transactions.RemoveXferUploader(m_transactionID); + + m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0); } /// @@ -421,6 +424,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction ourClient.SendAlertMessage("Unable to create inventory item"); m_transactions.RemoveXferUploader(m_transactionID); + + m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0); } + } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 5e831cca63..582b267ca4 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess base.AddRegion(scene); m_assMapper = new HGAssetMapper(scene, m_HomeURI); - scene.EventManager.OnNewInventoryItemUploadComplete += UploadInventoryItem; + scene.EventManager.OnNewInventoryItemUploadComplete += PostInventoryAsset; scene.EventManager.OnTeleportStart += TeleportStart; scene.EventManager.OnTeleportFail += TeleportFail; @@ -209,7 +209,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } } - public void UploadInventoryItem(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel) + public void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel) { if (type == AssetType.Link) return; @@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); - UploadInventoryItem(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0); + PostInventoryAsset(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0); return newAssetID; } @@ -260,7 +260,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { if (base.UpdateInventoryItemAsset(ownerID, item, asset)) { - UploadInventoryItem(ownerID, (AssetType)asset.Type, asset.FullID, asset.Name, 0); + PostInventoryAsset(ownerID, (AssetType)asset.Type, asset.FullID, asset.Name, 0); return true; } @@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess protected override void ExportAsset(UUID agentID, UUID assetID) { if (!assetID.Equals(UUID.Zero)) - UploadInventoryItem(agentID, AssetType.Unknown, assetID, "", 0); + PostInventoryAsset(agentID, AssetType.Unknown, assetID, "", 0); else m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); }