aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorDiva Canto2014-07-04 15:56:09 -0700
committerDiva Canto2014-07-04 15:56:09 -0700
commit78c155cd129824dfb651127f37786404a5ecfed6 (patch)
treee3af9130f0416ea5ce962253cf1e4c50bf652ea5 /OpenSim/Region/CoreModules
parentOn logout, delay the removal of AgentCircuitData until the very end, because ... (diff)
downloadopensim-SC-78c155cd129824dfb651127f37786404a5ecfed6.zip
opensim-SC-78c155cd129824dfb651127f37786404a5ecfed6.tar.gz
opensim-SC-78c155cd129824dfb651127f37786404a5ecfed6.tar.bz2
opensim-SC-78c155cd129824dfb651127f37786404a5ecfed6.tar.xz
Instrument the UDP path of creating assets so that it triggers an asset post for users with different asset servers
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs10
2 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 5e772e6..c598748 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using log4net; 31using log4net;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
35using OpenSim.Services.Interfaces; 36using OpenSim.Services.Interfaces;
36using PermissionMask = OpenSim.Framework.PermissionMask; 37using PermissionMask = OpenSim.Framework.PermissionMask;
@@ -376,6 +377,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
376 m_Scene.AssetService.Store(m_asset); 377 m_Scene.AssetService.Store(m_asset);
377 378
378 m_transactions.RemoveXferUploader(m_transactionID); 379 m_transactions.RemoveXferUploader(m_transactionID);
380
381 m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0);
379 } 382 }
380 383
381 /// <summary> 384 /// <summary>
@@ -421,6 +424,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
421 ourClient.SendAlertMessage("Unable to create inventory item"); 424 ourClient.SendAlertMessage("Unable to create inventory item");
422 425
423 m_transactions.RemoveXferUploader(m_transactionID); 426 m_transactions.RemoveXferUploader(m_transactionID);
427
428 m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0);
424 } 429 }
430
425 } 431 }
426} \ No newline at end of file 432} \ 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 5e831cc..582b267 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
130 130
131 base.AddRegion(scene); 131 base.AddRegion(scene);
132 m_assMapper = new HGAssetMapper(scene, m_HomeURI); 132 m_assMapper = new HGAssetMapper(scene, m_HomeURI);
133 scene.EventManager.OnNewInventoryItemUploadComplete += UploadInventoryItem; 133 scene.EventManager.OnNewInventoryItemUploadComplete += PostInventoryAsset;
134 scene.EventManager.OnTeleportStart += TeleportStart; 134 scene.EventManager.OnTeleportStart += TeleportStart;
135 scene.EventManager.OnTeleportFail += TeleportFail; 135 scene.EventManager.OnTeleportFail += TeleportFail;
136 136
@@ -209,7 +209,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
209 } 209 }
210 } 210 }
211 211
212 public void UploadInventoryItem(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel) 212 public void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
213 { 213 {
214 if (type == AssetType.Link) 214 if (type == AssetType.Link)
215 return; 215 return;
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
248 { 248 {
249 UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); 249 UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data);
250 250
251 UploadInventoryItem(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0); 251 PostInventoryAsset(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0);
252 252
253 return newAssetID; 253 return newAssetID;
254 } 254 }
@@ -260,7 +260,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
260 { 260 {
261 if (base.UpdateInventoryItemAsset(ownerID, item, asset)) 261 if (base.UpdateInventoryItemAsset(ownerID, item, asset))
262 { 262 {
263 UploadInventoryItem(ownerID, (AssetType)asset.Type, asset.FullID, asset.Name, 0); 263 PostInventoryAsset(ownerID, (AssetType)asset.Type, asset.FullID, asset.Name, 0);
264 return true; 264 return true;
265 } 265 }
266 266
@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
273 protected override void ExportAsset(UUID agentID, UUID assetID) 273 protected override void ExportAsset(UUID agentID, UUID assetID)
274 { 274 {
275 if (!assetID.Equals(UUID.Zero)) 275 if (!assetID.Equals(UUID.Zero))
276 UploadInventoryItem(agentID, AssetType.Unknown, assetID, "", 0); 276 PostInventoryAsset(agentID, AssetType.Unknown, assetID, "", 0);
277 else 277 else
278 m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); 278 m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
279 } 279 }