From 582c20b1c4fb669884f0e2804487dd050f779f2b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 25 May 2009 19:54:47 +0000
Subject: * reseparate inventory item creator id and creator uuid *
unfortunately, while the client requires uuids and we want to be able to have
arbitrary string ids, these cannot be kept in sync * I think the problems
last time were due to a serialization change * So the major inteface version
has been bumped to take care of any lingering issues here. * This means that
region servers beyond this revision can only connect to similarly uptodate
grid services, and vice versa
---
OpenSim/Framework/InventoryItemBase.cs | 24 ++++++++++++++++------
.../Servers/HttpServer/RestSessionService.cs | 4 ----
OpenSim/Framework/Servers/VersionInfo.cs | 2 +-
.../Grid/InventoryServer/GridInventoryService.cs | 5 +++--
.../Archiver/Tests/InventoryArchiverTests.cs | 3 ---
5 files changed, 22 insertions(+), 16 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 2968712..cab241e 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -84,26 +84,38 @@ namespace OpenSim.Framework
m_creatorId = value;
}
}
+ protected string m_creatorId;
- protected string m_creatorId = UUID.Zero.ToString();
///
- /// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
+ /// The UUID for the creator. This may be different from the canonical CreatorId. This property is used
+ /// for communication with the client over the Second Life protocol, since that protocol can only understand
+ /// UUIDs. As this is a basic framework class, this means that both the string creator id and the uuid
+ /// reference have to be settable separately
+ ///
+ /// Database plugins don't need to set this, it will be set by
/// upstream code (or set by the get accessor if left unset).
+ ///
+ /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
+ /// every time there was communication with a UUID-only client. This may be much more expensive.
///
public UUID CreatorIdAsUuid
{
get
{
- UUID temp = UUID.Zero;
- UUID.TryParse(CreatorId, out temp);
- return temp;
+ if (UUID.Zero == m_creatorIdAsUuid)
+ {
+ UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
+ }
+
+ return m_creatorIdAsUuid;
}
set
{
- CreatorId = value.ToString();
+ m_creatorIdAsUuid = value;
}
}
+ protected UUID m_creatorIdAsUuid = UUID.Zero;
///
/// The description of the inventory item (must be less than 64 characters)
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
index f5e4248..ec2f9ec 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
@@ -236,10 +236,6 @@ namespace OpenSim.Framework.Servers.HttpServer
///
/// The operation to perform once trust has been established.
///
- ///
- ///
- ///
- ///
private RestDeserialiseMethod m_method;
///
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index 7ed3b96..c16a7f4 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -48,6 +48,6 @@ namespace OpenSim
/// of the code that is too old.
///
///
- public readonly static int MajorInterfaceVersion = 3;
+ public readonly static int MajorInterfaceVersion = 4;
}
}
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index 16d8154..66dfb14 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Grid.InventoryServer
///
public class GridInventoryService : InventoryServiceBase
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private bool m_doLookup = false;
public bool DoLookup
@@ -51,8 +53,7 @@ namespace OpenSim.Grid.InventoryServer
get { return m_doLookup; }
set { m_doLookup = value; }
}
- private static readonly ILog m_log
- = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
private static readonly int INVENTORY_DEFAULT_SESSION_TIME = 30; // secs
private string m_userserver_url;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index fd79ffa..20adb21 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -198,7 +198,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test]
public void TestLoadIarV0_1ExistingUsers()
{
- Assert.Ignore();
TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure();
@@ -265,9 +264,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test]
public void TestLoadIarV0_1TempProfiles()
{
- Assert.Ignore();
TestHelper.InMethod();
- Console.WriteLine("### Started {0} ###", MethodBase.GetCurrentMethod());
log4net.Config.XmlConfigurator.Configure();
--
cgit v1.1