diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 4 |
2 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 6653516..da54469 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -39,6 +39,7 @@ using OpenSim.Framework.Serialization.External; | |||
39 | using OpenSim.Framework.Communications; | 39 | using OpenSim.Framework.Communications; |
40 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
41 | using OpenSim.Framework.Communications.Osp; | 41 | using OpenSim.Framework.Communications.Osp; |
42 | using OpenSim.Region.Framework.Scenes; | ||
42 | using OpenSim.Region.CoreModules.World.Archiver; | 43 | using OpenSim.Region.CoreModules.World.Archiver; |
43 | using OpenSim.Region.Framework.Scenes; | 44 | using OpenSim.Region.Framework.Scenes; |
44 | 45 | ||
@@ -60,6 +61,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
60 | protected UuidGatherer m_assetGatherer; | 61 | protected UuidGatherer m_assetGatherer; |
61 | 62 | ||
62 | /// <value> | 63 | /// <value> |
64 | /// We only use this to request modules | ||
65 | /// </value> | ||
66 | protected Scene m_scene; | ||
67 | |||
68 | /// <value> | ||
63 | /// ID of this request | 69 | /// ID of this request |
64 | /// </value> | 70 | /// </value> |
65 | protected Guid m_id; | 71 | protected Guid m_id; |
@@ -83,10 +89,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
83 | /// Constructor | 89 | /// Constructor |
84 | /// </summary> | 90 | /// </summary> |
85 | public InventoryArchiveWriteRequest( | 91 | public InventoryArchiveWriteRequest( |
86 | Guid id, InventoryArchiverModule module, CachedUserInfo userInfo, string invPath, string savePath) | 92 | Guid id, InventoryArchiverModule module, Scene scene, |
93 | CachedUserInfo userInfo, string invPath, string savePath) | ||
87 | : this( | 94 | : this( |
88 | id, | 95 | id, |
89 | module, | 96 | module, |
97 | scene, | ||
90 | userInfo, | 98 | userInfo, |
91 | invPath, | 99 | invPath, |
92 | new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress)) | 100 | new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress)) |
@@ -97,10 +105,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
97 | /// Constructor | 105 | /// Constructor |
98 | /// </summary> | 106 | /// </summary> |
99 | public InventoryArchiveWriteRequest( | 107 | public InventoryArchiveWriteRequest( |
100 | Guid id, InventoryArchiverModule module, CachedUserInfo userInfo, string invPath, Stream saveStream) | 108 | Guid id, InventoryArchiverModule module, Scene scene, |
109 | CachedUserInfo userInfo, string invPath, Stream saveStream) | ||
101 | { | 110 | { |
102 | m_id = id; | 111 | m_id = id; |
103 | m_module = module; | 112 | m_module = module; |
113 | m_scene = scene; | ||
104 | m_userInfo = userInfo; | 114 | m_userInfo = userInfo; |
105 | m_invPath = invPath; | 115 | m_invPath = invPath; |
106 | m_saveStream = saveStream; | 116 | m_saveStream = saveStream; |
@@ -135,7 +145,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
135 | m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; | 145 | m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; |
136 | 146 | ||
137 | InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); | 147 | InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); |
138 | saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_module.CommsManager); | 148 | saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_scene.CommsManager); |
139 | 149 | ||
140 | string serialization = UserInventoryItemSerializer.Serialize(saveItem); | 150 | string serialization = UserInventoryItemSerializer.Serialize(saveItem); |
141 | m_archiveWriter.WriteFile(filename, serialization); | 151 | m_archiveWriter.WriteFile(filename, serialization); |
@@ -222,7 +232,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
222 | // | 232 | // |
223 | // FIXME: FetchInventory should probably be assumed to by async anyway, since even standalones might | 233 | // FIXME: FetchInventory should probably be assumed to by async anyway, since even standalones might |
224 | // use a remote inventory service, though this is vanishingly rare at the moment. | 234 | // use a remote inventory service, though this is vanishingly rare at the moment. |
225 | if (null == m_module.CommsManager.UserAdminService) | 235 | if (null == m_scene.CommsManager.UserAdminService) |
226 | { | 236 | { |
227 | m_log.ErrorFormat( | 237 | m_log.ErrorFormat( |
228 | "[INVENTORY ARCHIVER]: Have not yet received inventory info for user {0} {1}", | 238 | "[INVENTORY ARCHIVER]: Have not yet received inventory info for user {0} {1}", |
@@ -313,7 +323,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
313 | SaveUsers(); | 323 | SaveUsers(); |
314 | new AssetsRequest( | 324 | new AssetsRequest( |
315 | new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys, | 325 | new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys, |
316 | m_module.AssetService, ReceivedAllAssets).Execute(); | 326 | m_scene.AssetService, ReceivedAllAssets).Execute(); |
317 | } | 327 | } |
318 | 328 | ||
319 | /// <summary> | 329 | /// <summary> |
@@ -327,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
327 | { | 337 | { |
328 | // Record the creator of this item | 338 | // Record the creator of this item |
329 | CachedUserInfo creator | 339 | CachedUserInfo creator |
330 | = m_module.CommsManager.UserProfileCacheService.GetUserDetails(creatorId); | 340 | = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(creatorId); |
331 | 341 | ||
332 | if (creator != null) | 342 | if (creator != null) |
333 | { | 343 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 55d7997..36e17b4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
126 | CachedUserInfo userInfo = GetUserInfo(firstName, lastName); | 126 | CachedUserInfo userInfo = GetUserInfo(firstName, lastName); |
127 | 127 | ||
128 | if (userInfo != null) | 128 | if (userInfo != null) |
129 | new InventoryArchiveWriteRequest(id, this, userInfo, invPath, saveStream).Execute(); | 129 | new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
137 | CachedUserInfo userInfo = GetUserInfo(firstName, lastName); | 137 | CachedUserInfo userInfo = GetUserInfo(firstName, lastName); |
138 | 138 | ||
139 | if (userInfo != null) | 139 | if (userInfo != null) |
140 | new InventoryArchiveWriteRequest(id, this, userInfo, invPath, savePath).Execute(); | 140 | new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||