mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Change existing IAR save to use UUID for its callback reference instead of Guid. This is for uniformity as discussed on IRC.
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
3bde737f76
commit
08675d44a7
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
/// <value>
|
||||
/// ID of this request
|
||||
/// </value>
|
||||
protected Guid m_id;
|
||||
protected UUID m_id;
|
||||
|
||||
/// <value>
|
||||
/// 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
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public InventoryArchiveWriteRequest(
|
||||
Guid id, InventoryArchiverModule module, Scene scene,
|
||||
UUID id, InventoryArchiverModule module, Scene scene,
|
||||
UserAccount userInfo, string invPath, string savePath)
|
||||
: this(
|
||||
id,
|
||||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public InventoryArchiveWriteRequest(
|
||||
Guid id, InventoryArchiverModule module, Scene scene,
|
||||
UUID id, InventoryArchiverModule module, Scene scene,
|
||||
UserAccount userInfo, string invPath, Stream saveStream)
|
||||
{
|
||||
m_id = id;
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
/// <value>
|
||||
/// Pending save completions initiated from the console
|
||||
/// </value>
|
||||
protected List<Guid> m_pendingConsoleSaves = new List<Guid>();
|
||||
protected List<UUID> m_pendingConsoleSaves = new List<UUID>();
|
||||
|
||||
/// <value>
|
||||
/// All scenes that this module knows about
|
||||
@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
/// Trigger the inventory archive saved event.
|
||||
/// </summary>
|
||||
protected internal void TriggerInventoryArchiveSaved(
|
||||
Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
|
||||
UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
|
||||
Exception reportedException)
|
||||
{
|
||||
InventoryArchiveSaved handlerInventoryArchiveSaved = OnInventoryArchiveSaved;
|
||||
@@ -184,13 +184,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
}
|
||||
|
||||
public bool ArchiveInventory(
|
||||
Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream)
|
||||
UUID id, string firstName, string lastName, string invPath, string pass, Stream saveStream)
|
||||
{
|
||||
return ArchiveInventory(id, firstName, lastName, invPath, pass, saveStream, new Dictionary<string, object>());
|
||||
}
|
||||
|
||||
public bool ArchiveInventory(
|
||||
Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream,
|
||||
UUID id, string firstName, string lastName, string invPath, string pass, Stream saveStream,
|
||||
Dictionary<string, object> options)
|
||||
{
|
||||
if (m_scenes.Count > 0)
|
||||
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
}
|
||||
|
||||
public bool ArchiveInventory(
|
||||
Guid id, string firstName, string lastName, string invPath, string pass, string savePath,
|
||||
UUID id, string firstName, string lastName, string invPath, string pass, string savePath,
|
||||
Dictionary<string, object> options)
|
||||
{
|
||||
// if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, savePath))
|
||||
@@ -417,7 +417,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
/// <param name="cmdparams"></param>
|
||||
protected void HandleSaveInvConsoleCommand(string module, string[] cmdparams)
|
||||
{
|
||||
Guid id = Guid.NewGuid();
|
||||
UUID id = UUID.Random();
|
||||
|
||||
Dictionary<string, object> options = new Dictionary<string, object>();
|
||||
|
||||
@@ -477,7 +477,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
}
|
||||
|
||||
private void SaveInvConsoleCommandCompleted(
|
||||
Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
|
||||
UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
|
||||
Exception reportedException)
|
||||
{
|
||||
lock (m_pendingConsoleSaves)
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||
|
||||
mre.Reset();
|
||||
archiverModule.ArchiveInventory(
|
||||
Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream);
|
||||
UUID.Random(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream);
|
||||
mre.WaitOne(60000, false);
|
||||
|
||||
// LOAD ITEM
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||
|
||||
mre.Reset();
|
||||
m_archiverModule.ArchiveInventory(
|
||||
Guid.NewGuid(), userFirstName, userLastName, "/", userPassword, archiveWriteStream);
|
||||
UUID.Random(), userFirstName, userLastName, "/", userPassword, archiveWriteStream);
|
||||
mre.WaitOne(60000, false);
|
||||
|
||||
// Test created iar
|
||||
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||
|
||||
mre.Reset();
|
||||
m_archiverModule.ArchiveInventory(
|
||||
Guid.NewGuid(), userFirstName, userLastName, "f1", userPassword, archiveWriteStream);
|
||||
UUID.Random(), userFirstName, userLastName, "f1", userPassword, archiveWriteStream);
|
||||
mre.WaitOne(60000, false);
|
||||
|
||||
// Test created iar
|
||||
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||
|
||||
mre.Reset();
|
||||
m_archiverModule.ArchiveInventory(
|
||||
Guid.NewGuid(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream);
|
||||
UUID.Random(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream);
|
||||
mre.WaitOne(60000, false);
|
||||
|
||||
byte[] archive = archiveWriteStream.ToArray();
|
||||
@@ -364,7 +364,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||
|
||||
// When we're not saving assets, archiving is being done synchronously.
|
||||
m_archiverModule.ArchiveInventory(
|
||||
Guid.NewGuid(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream, options);
|
||||
UUID.Random(), userFirstName, userLastName, "Objects/" + item1Name, userPassword, archiveWriteStream, options);
|
||||
|
||||
byte[] archive = archiveWriteStream.ToArray();
|
||||
MemoryStream archiveReadStream = new MemoryStream(archive);
|
||||
|
||||
@@ -163,13 +163,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||
scene.AddInventoryItem(coaItem);
|
||||
|
||||
archiverModule.ArchiveInventory(
|
||||
Guid.NewGuid(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream);
|
||||
UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream);
|
||||
|
||||
m_iarStreamBytes = archiveWriteStream.ToArray();
|
||||
}
|
||||
|
||||
protected void SaveCompleted(
|
||||
Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
|
||||
UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
|
||||
Exception reportedException)
|
||||
{
|
||||
mre.Set();
|
||||
|
||||
Reference in New Issue
Block a user