aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-26 16:39:30 +0000
committerJustin Clark-Casey (justincc)2009-11-26 16:39:30 +0000
commit2bc19a1e23594e00e2bc812d27d4b4804b438bdf (patch)
tree4c6631a809a03c966824ed9f7f39a41c7fb135e3
parent* Re-enable the AbsolutePosition = AbsolutePosition in the LSL_Api in the Set... (diff)
downloadopensim-SC_OLD-2bc19a1e23594e00e2bc812d27d4b4804b438bdf.zip
opensim-SC_OLD-2bc19a1e23594e00e2bc812d27d4b4804b438bdf.tar.gz
opensim-SC_OLD-2bc19a1e23594e00e2bc812d27d4b4804b438bdf.tar.bz2
opensim-SC_OLD-2bc19a1e23594e00e2bc812d27d4b4804b438bdf.tar.xz
Resolve issue where an iar load fails to preserve original item creators
See http://opensimulator.org/mantis/view.php?id=4394 This change preserves the uuid when a profile is found rather than the ospa
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs9
3 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 8532d03..b778389 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -348,9 +348,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
348 348
349 UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.CommsManager); 349 UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.CommsManager);
350 if (UUID.Zero != ospResolvedId) 350 if (UUID.Zero != ospResolvedId)
351 {
351 item.CreatorIdAsUuid = ospResolvedId; 352 item.CreatorIdAsUuid = ospResolvedId;
353
354 // XXX: For now, don't preserve the OSPA in the creator id (which actually gets persisted to the
355 // database). Instead, replace with the UUID that we found.
356 item.CreatorId = ospResolvedId.ToString();
357 }
352 else 358 else
359 {
353 item.CreatorIdAsUuid = m_userInfo.UserProfile.ID; 360 item.CreatorIdAsUuid = m_userInfo.UserProfile.ID;
361 }
354 362
355 item.Owner = m_userInfo.UserProfile.ID; 363 item.Owner = m_userInfo.UserProfile.ID;
356 364
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 2c0d113..ecd60bd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -280,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
280 string savePath = (cmdparams.Length > 6 ? cmdparams[6] : DEFAULT_INV_BACKUP_FILENAME); 280 string savePath = (cmdparams.Length > 6 ? cmdparams[6] : DEFAULT_INV_BACKUP_FILENAME);
281 281
282 m_log.InfoFormat( 282 m_log.InfoFormat(
283 "[INVENTORY ARCHIVER]: Saving archive {0} from inventory path {1} for {2} {3}", 283 "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}",
284 savePath, invPath, firstName, lastName); 284 savePath, invPath, firstName, lastName);
285 285
286 Guid id = Guid.NewGuid(); 286 Guid id = Guid.NewGuid();
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 7927352..e4dad18 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -259,9 +259,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
259 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, userInfo.UserProfile.ID, item1Name); 259 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, userInfo.UserProfile.ID, item1Name);
260 260
261 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 261 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
262
263// We have to disable this check since loaded items that did find users via OSPA resolution are now only storing the
264// UUID, not the OSPA itself.
265// Assert.That(
266// foundItem1.CreatorId, Is.EqualTo(item1.CreatorId),
267// "Loaded item non-uuid creator doesn't match original");
262 Assert.That( 268 Assert.That(
263 foundItem1.CreatorId, Is.EqualTo(item1.CreatorId), 269 foundItem1.CreatorId, Is.EqualTo(userItemCreatorUuid.ToString()),
264 "Loaded item non-uuid creator doesn't match original"); 270 "Loaded item non-uuid creator doesn't match original");
271
265 Assert.That( 272 Assert.That(
266 foundItem1.CreatorIdAsUuid, Is.EqualTo(userItemCreatorUuid), 273 foundItem1.CreatorIdAsUuid, Is.EqualTo(userItemCreatorUuid),
267 "Loaded item uuid creator doesn't match original"); 274 "Loaded item uuid creator doesn't match original");