diff options
author | Justin Clarke Casey | 2009-02-11 17:34:12 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-11 17:34:12 +0000 |
commit | 04d6a810b6df79b34f9754e0a1b189c070407727 (patch) | |
tree | fe89d63863557709283264b379d281e3b70b2d42 /OpenSim/Region/CoreModules | |
parent | Thank you kindly, FrankNichols for a patch that: (diff) | |
download | opensim-SC_OLD-04d6a810b6df79b34f9754e0a1b189c070407727.zip opensim-SC_OLD-04d6a810b6df79b34f9754e0a1b189c070407727.tar.gz opensim-SC_OLD-04d6a810b6df79b34f9754e0a1b189c070407727.tar.bz2 opensim-SC_OLD-04d6a810b6df79b34f9754e0a1b189c070407727.tar.xz |
* More inventory archive invocation to a proper region module
* Not ready for use yet
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 49006a2..704296c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -47,16 +47,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | protected Scene scene; | ||
51 | protected TarArchiveReader archive; | 50 | protected TarArchiveReader archive; |
52 | private static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); | 51 | private static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); |
53 | 52 | ||
54 | CommunicationsManager commsManager; | 53 | CommunicationsManager commsManager; |
55 | 54 | ||
56 | public InventoryArchiveReadRequest(Scene currentScene, CommunicationsManager commsManager) | 55 | public InventoryArchiveReadRequest(CommunicationsManager commsManager) |
57 | { | 56 | { |
58 | //List<string> serialisedObjects = new List<string>(); | 57 | //List<string> serialisedObjects = new List<string>(); |
59 | scene = currentScene; | ||
60 | this.commsManager = commsManager; | 58 | this.commsManager = commsManager; |
61 | } | 59 | } |
62 | 60 | ||
@@ -261,8 +259,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
261 | asset.Metadata.Type = assetType; | 259 | asset.Metadata.Type = assetType; |
262 | asset.Data = data; | 260 | asset.Data = data; |
263 | 261 | ||
264 | scene.AssetCache.AddAsset(asset); | 262 | commsManager.AssetCache.AddAsset(asset); |
265 | |||
266 | 263 | ||
267 | return true; | 264 | return true; |
268 | } | 265 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index f548296..90e2fcd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -39,14 +39,12 @@ using OpenSim.Framework.Communications; | |||
39 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
40 | using log4net; | 40 | using log4net; |
41 | 41 | ||
42 | |||
43 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | 42 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver |
44 | { | 43 | { |
45 | public class InventoryArchiveWriteRequest | 44 | public class InventoryArchiveWriteRequest |
46 | { | 45 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 47 | ||
49 | protected Scene scene; | ||
50 | protected TarArchiveWriter archive; | 48 | protected TarArchiveWriter archive; |
51 | protected CommunicationsManager commsManager; | 49 | protected CommunicationsManager commsManager; |
52 | Dictionary<UUID, int> assetUuids; | 50 | Dictionary<UUID, int> assetUuids; |
@@ -56,9 +54,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
56 | /// </value> | 54 | /// </value> |
57 | private string m_savePath; | 55 | private string m_savePath; |
58 | 56 | ||
59 | public InventoryArchiveWriteRequest(Scene currentScene, CommunicationsManager commsManager) | 57 | public InventoryArchiveWriteRequest(CommunicationsManager commsManager) |
60 | { | 58 | { |
61 | scene = currentScene; | ||
62 | archive = new TarArchiveWriter(); | 59 | archive = new TarArchiveWriter(); |
63 | this.commsManager = commsManager; | 60 | this.commsManager = commsManager; |
64 | assetUuids = new Dictionary<UUID, int>(); | 61 | assetUuids = new Dictionary<UUID, int>(); |
@@ -241,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
241 | saveInvDir(inventoryFolder, ""); | 238 | saveInvDir(inventoryFolder, ""); |
242 | } | 239 | } |
243 | 240 | ||
244 | new AssetsRequest(assetUuids.Keys, scene.AssetCache, ReceivedAllAssets).Execute(); | 241 | new AssetsRequest(assetUuids.Keys, commsManager.AssetCache, ReceivedAllAssets).Execute(); |
245 | } | 242 | } |
246 | } | 243 | } |
247 | } | 244 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 6259662..dd65e83 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
48 | 48 | ||
49 | private Scene m_scene; | 49 | private Scene m_scene; |
50 | 50 | ||
51 | public string Name { get { return "Archiver Module"; } } | 51 | public string Name { get { return "Region Archiver Module"; } } |
52 | 52 | ||
53 | public bool IsSharedModule { get { return false; } } | 53 | public bool IsSharedModule { get { return false; } } |
54 | 54 | ||