From 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d Mon Sep 17 00:00:00 2001 From: diva Date: Fri, 15 May 2009 05:00:25 +0000 Subject: Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only. This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now --- .../Inventory/Archiver/InventoryArchiverModule.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index c5699c0..efef840 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -37,6 +37,7 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { @@ -62,11 +63,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// All scenes that this module knows about /// private Dictionary m_scenes = new Dictionary(); - + private Scene m_aScene; /// /// The comms manager we will use for all comms requests /// protected internal CommunicationsManager CommsManager; + protected internal IAssetService AssetService; public void Initialise(Scene scene, IConfigSource source) { @@ -84,13 +86,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver scene.AddCommand( this, "save iar", "save iar []", - "Save user inventory archive. EXPERIMENTAL, PLEASE DO NOT USE YET", HandleSaveInvConsoleCommand); + "Save user inventory archive. EXPERIMENTAL, PLEASE DO NOT USE YET", HandleSaveInvConsoleCommand); + + m_aScene = scene; } m_scenes[scene.RegionInfo.RegionID] = scene; } - public void PostInitialise() {} + public void PostInitialise() + { + AssetService = m_aScene.AssetService; + } public void Close() {} @@ -114,7 +121,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (userInfo != null) { InventoryArchiveReadRequest request = - new InventoryArchiveReadRequest(userInfo, invPath, loadStream, CommsManager); + new InventoryArchiveReadRequest(userInfo, invPath, loadStream, CommsManager, AssetService); UpdateClientWithLoadedNodes(userInfo, request.Execute()); } } @@ -140,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (userInfo != null) { InventoryArchiveReadRequest request = - new InventoryArchiveReadRequest(userInfo, invPath, loadPath, CommsManager); + new InventoryArchiveReadRequest(userInfo, invPath, loadPath, CommsManager, AssetService); UpdateClientWithLoadedNodes(userInfo, request.Execute()); } } -- cgit v1.1