diff options
author | AliciaRaven | 2014-09-06 05:19:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-09-23 00:04:50 +0100 |
commit | 08675d44a754156ecdfd09d01ae1209bf73e2533 (patch) | |
tree | b67c465a45e32b4055348b5c20aee0e721fc736b /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver | |
parent | Include same content filters for IAR file exports that already exist for OAR ... (diff) | |
download | opensim-SC_OLD-08675d44a754156ecdfd09d01ae1209bf73e2533.zip opensim-SC_OLD-08675d44a754156ecdfd09d01ae1209bf73e2533.tar.gz opensim-SC_OLD-08675d44a754156ecdfd09d01ae1209bf73e2533.tar.bz2 opensim-SC_OLD-08675d44a754156ecdfd09d01ae1209bf73e2533.tar.xz |
Change existing IAR save to use UUID for its callback reference instead of Guid. This is for uniformity as discussed on IRC.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver')
5 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index ce81deb..0605db5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
80 | /// <value> | 80 | /// <value> |
81 | /// ID of this request | 81 | /// ID of this request |
82 | /// </value> | 82 | /// </value> |
83 | protected Guid m_id; | 83 | protected UUID m_id; |
84 | 84 | ||
85 | /// <value> | 85 | /// <value> |
86 | /// Used to collect the uuids of the assets that we need to save into the archive | 86 | /// Used to collect the uuids of the assets that we need to save into the archive |
@@ -101,7 +101,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
101 | /// Constructor | 101 | /// Constructor |
102 | /// </summary> | 102 | /// </summary> |
103 | public InventoryArchiveWriteRequest( | 103 | public InventoryArchiveWriteRequest( |
104 | Guid id, InventoryArchiverModule module, Scene scene, | 104 | UUID id, InventoryArchiverModule module, Scene scene, |
105 | UserAccount userInfo, string invPath, string savePath) | 105 | UserAccount userInfo, string invPath, string savePath) |
106 | : this( | 106 | : this( |
107 | id, | 107 | id, |
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
117 | /// Constructor | 117 | /// Constructor |
118 | /// </summary> | 118 | /// </summary> |
119 | public InventoryArchiveWriteRequest( | 119 | public InventoryArchiveWriteRequest( |
120 | Guid id, InventoryArchiverModule module, Scene scene, | 120 | UUID id, InventoryArchiverModule module, Scene scene, |
121 | UserAccount userInfo, string invPath, Stream saveStream) | 121 | UserAccount userInfo, string invPath, Stream saveStream) |
122 | { | 122 | { |
123 | m_id = id; | 123 | m_id = id; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index dc67738..0e4d79c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
66 | /// <value> | 66 | /// <value> |
67 | /// Pending save completions initiated from the console | 67 | /// Pending save completions initiated from the console |
68 | /// </value> | 68 | /// </value> |
69 | protected List<Guid> m_pendingConsoleSaves = new List<Guid>(); | 69 | protected List<UUID> m_pendingConsoleSaves = new List<UUID>(); |
70 | 70 | ||
71 | /// <value> | 71 | /// <value> |
72 | /// All scenes that this module knows about | 72 | /// All scenes that this module knows about |
@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
175 | /// Trigger the inventory archive saved event. | 175 | /// Trigger the inventory archive saved event. |
176 | /// </summary> | 176 | /// </summary> |
177 | protected internal void TriggerInventoryArchiveSaved( | 177 | protected internal void TriggerInventoryArchiveSaved( |
178 | Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, | 178 | UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, |
179 | Exception reportedException) | 179 | Exception reportedException) |
180 | { | 180 | { |
181 | InventoryArchiveSaved handlerInventoryArchiveSaved = OnInventoryArchiveSaved; | 181 | InventoryArchiveSaved handlerInventoryArchiveSaved = OnInventoryArchiveSaved; |
@@ -184,13 +184,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
184 | } | 184 | } |
185 | 185 | ||
186 | public bool ArchiveInventory( | 186 | public bool ArchiveInventory( |
187 | Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream) | 187 | UUID id, string firstName, string lastName, string invPath, string pass, Stream saveStream) |
188 | { | 188 | { |
189 | return ArchiveInventory(id, firstName, lastName, invPath, pass, saveStream, new Dictionary<string, object>()); | 189 | return ArchiveInventory(id, firstName, lastName, invPath, pass, saveStream, new Dictionary<string, object>()); |
190 | } | 190 | } |
191 | 191 | ||
192 | public bool ArchiveInventory( | 192 | public bool ArchiveInventory( |
193 | Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream, | 193 | UUID id, string firstName, string lastName, string invPath, string pass, Stream saveStream, |
194 | Dictionary<string, object> options) | 194 | Dictionary<string, object> options) |
195 | { | 195 | { |
196 | if (m_scenes.Count > 0) | 196 | if (m_scenes.Count > 0) |
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
230 | } | 230 | } |
231 | 231 | ||
232 | public bool ArchiveInventory( | 232 | public bool ArchiveInventory( |
233 | Guid id, string firstName, string lastName, string invPath, string pass, string savePath, | 233 | UUID id, string firstName, string lastName, string invPath, string pass, string savePath, |
234 | Dictionary<string, object> options) | 234 | Dictionary<string, object> options) |
235 | { | 235 | { |
236 | // if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, savePath)) | 236 | // if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, savePath)) |
@@ -417,7 +417,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
417 | /// <param name="cmdparams"></param> | 417 | /// <param name="cmdparams"></param> |
418 | protected void HandleSaveInvConsoleCommand(string module, string[] cmdparams) | 418 | protected void HandleSaveInvConsoleCommand(string module, string[] cmdparams) |
419 | { | 419 | { |
420 | Guid id = Guid.NewGuid(); | 420 | UUID id = UUID.Random(); |
421 | 421 | ||
422 | Dictionary<string, object> options = new Dictionary<string, object>(); | 422 | Dictionary<string, object> options = new Dictionary<string, object>(); |
423 | 423 | ||
@@ -477,7 +477,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
477 | } | 477 | } |
478 | 478 | ||
479 | private void SaveInvConsoleCommandCompleted( | 479 | private void SaveInvConsoleCommandCompleted( |
480 | Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, | 480 | UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, |
481 | Exception reportedException) | 481 | Exception reportedException) |
482 | { | 482 | { |
483 | lock (m_pendingConsoleSaves) | 483 | lock (m_pendingConsoleSaves) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs index 08f199a..dabece3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs | |||
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
180 | 180 | ||
181 | mre.Reset(); | 181 | mre.Reset(); |
182 | archiverModule.ArchiveInventory( | 182 | archiverModule.ArchiveInventory( |
183 | Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream); | 183 | UUID.Random(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream); |
184 | mre.WaitOne(60000, false); | 184 | mre.WaitOne(60000, false); |
185 | 185 | ||
186 | // LOAD ITEM | 186 | // LOAD ITEM |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs index b85739e..254aa11 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
110 | 110 | ||
111 | mre.Reset(); | 111 | mre.Reset(); |
112 | m_archiverModule.ArchiveInventory( | 112 | m_archiverModule.ArchiveInventory( |
113 | Guid.NewGuid(), userFirstName, userLastName, "/", userPassword, archiveWriteStream); | 113 | UUID.Random(), userFirstName, userLastName, "/", userPassword, archiveWriteStream); |
114 | mre.WaitOne(60000, false); | 114 | mre.WaitOne(60000, false); |
115 | 115 | ||
116 | // Test created iar | 116 | // Test created iar |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
179 | 179 | ||
180 | mre.Reset(); | 180 | mre.Reset(); |
181 | m_archiverModule.ArchiveInventory( | 181 | m_archiverModule.ArchiveInventory( |
182 | Guid.NewGuid(), userFirstName, userLastName, "f1", userPassword, archiveWriteStream); | 182 | UUID.Random(), userFirstName, userLastName, "f1", userPassword, archiveWriteStream); |
183 | mre.WaitOne(60000, false); | 183 | mre.WaitOne(60000, false); |
184 | 184 | ||
185 | // Test created iar | 185 | // Test created iar |
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
267 | 267 | ||
268 | mre.Reset(); | 268 | mre.Reset(); |
269 | m_archiverModule.ArchiveInventory( | 269 | m_archiverModule.ArchiveInventory( |
270 | Guid.NewGuid(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream); | 270 | UUID.Random(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream); |
271 | mre.WaitOne(60000, false); | 271 | mre.WaitOne(60000, false); |
272 | 272 | ||
273 | byte[] archive = archiveWriteStream.ToArray(); | 273 | byte[] archive = archiveWriteStream.ToArray(); |
@@ -364,7 +364,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
364 | 364 | ||
365 | // When we're not saving assets, archiving is being done synchronously. | 365 | // When we're not saving assets, archiving is being done synchronously. |
366 | m_archiverModule.ArchiveInventory( | 366 | m_archiverModule.ArchiveInventory( |
367 | Guid.NewGuid(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream, options); | 367 | UUID.Random(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream, options); |
368 | 368 | ||
369 | byte[] archive = archiveWriteStream.ToArray(); | 369 | byte[] archive = archiveWriteStream.ToArray(); |
370 | MemoryStream archiveReadStream = new MemoryStream(archive); | 370 | MemoryStream archiveReadStream = new MemoryStream(archive); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index db78da9..cc746d5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -163,13 +163,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
163 | scene.AddInventoryItem(coaItem); | 163 | scene.AddInventoryItem(coaItem); |
164 | 164 | ||
165 | archiverModule.ArchiveInventory( | 165 | archiverModule.ArchiveInventory( |
166 | Guid.NewGuid(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); | 166 | UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); |
167 | 167 | ||
168 | m_iarStreamBytes = archiveWriteStream.ToArray(); | 168 | m_iarStreamBytes = archiveWriteStream.ToArray(); |
169 | } | 169 | } |
170 | 170 | ||
171 | protected void SaveCompleted( | 171 | protected void SaveCompleted( |
172 | Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, | 172 | UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, |
173 | Exception reportedException) | 173 | Exception reportedException) |
174 | { | 174 | { |
175 | mre.Set(); | 175 | mre.Set(); |