From f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 8 Apr 2009 17:50:57 +0000
Subject: * Make it possible to store creator strings in user inventory items
as well as UUIDs * All existing functionality should be unaffected. *
Database schemas have not been changed.
---
.../Rest/Inventory/RestInventoryServices.cs | 8 +++---
OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 27 +++++++++---------
OpenSim/Data/MySQL/MySQLInventoryData.cs | 12 ++++----
OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 8 +++---
OpenSim/Data/Tests/BasicInventoryTest.cs | 2 +-
OpenSim/Data/Tests/BasicRegionTest.cs | 4 +--
.../Communications/Cache/LibraryRootFolder.cs | 4 +--
.../Framework/Communications/Capabilities/Caps.cs | 4 +--
OpenSim/Framework/InventoryItemBase.cs | 33 +++++++++++++++++++---
.../Plugins/InventoryArchivePlugin.cs | 2 +-
.../OpenSim/OpenSimInventoryFrontendPlugin.cs | 6 ++--
OpenSim/Grid/AssetInventoryServer/Utils.cs | 4 +--
.../Region/ClientStack/LindenUDP/LLClientView.cs | 27 +++++++++---------
.../Agent/AssetTransaction/AssetXferUploader.cs | 3 +-
.../CoreModules/Avatar/Friends/FriendsModule.cs | 2 +-
.../Archiver/InventoryArchiveReadRequest.cs | 4 +--
.../Archiver/InventoryArchiveWriteRequest.cs | 4 +--
.../Communications/REST/RESTInterregionComms.cs | 1 +
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 14 ++++-----
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +-
.../Framework/Scenes/SceneObjectGroup.Inventory.cs | 2 +-
21 files changed, 98 insertions(+), 75 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index 95e3d71..f0d9946 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -1293,7 +1293,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.writer.WriteAttributeString("uuid", String.Empty, i.ID.ToString());
rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString());
rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString());
- rdata.writer.WriteAttributeString("creator", String.Empty, i.Creator.ToString());
+ rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId);
rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString());
rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString());
rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString());
@@ -1392,7 +1392,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|| newf.Folder != oldf.Folder
|| newf.Description != oldf.Description
|| newf.Owner != oldf.Owner
- || newf.Creator != oldf.Creator
+ || newf.CreatorId != oldf.CreatorId
|| newf.AssetID != oldf.AssetID
|| newf.GroupID != oldf.GroupID
|| newf.GroupOwned != oldf.GroupOwned
@@ -1676,7 +1676,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.ID = UUID.Zero;
result.Folder = UUID.Zero;
result.Owner = ic.UserID;
- result.Creator = ic.UserID;
+ result.CreatorId = ic.UserID.ToString();
result.AssetID = UUID.Zero;
result.GroupID = UUID.Zero;
result.GroupOwned = false;
@@ -1710,7 +1710,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.InvType = Int32.Parse(ic.xml.Value);
break;
case "creator":
- result.Creator = new UUID(ic.xml.Value);
+ result.CreatorId = ic.xml.Value;
break;
case "assettype":
result.AssetType = Int32.Parse(ic.xml.Value);
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index fe8287d..6a4fbab 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL
}
}
}
- m_log.InfoFormat("[INVENTORY DB] : FOund no inventory folder with ID : {0}", folderID);
+ m_log.InfoFormat("[INVENTORY DB] : Found no inventory folder with ID : {0}", folderID);
return null;
}
@@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL
}
catch (Exception e)
{
- m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message);
+ m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
}
}
}
@@ -277,7 +277,7 @@ namespace OpenSim.Data.MSSQL
}
catch (Exception e)
{
- m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message);
+ m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
}
}
}
@@ -300,7 +300,7 @@ namespace OpenSim.Data.MSSQL
}
catch (Exception e)
{
- m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message);
+ m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
}
}
}
@@ -385,7 +385,8 @@ namespace OpenSim.Data.MSSQL
}
}
}
- m_log.InfoFormat("[INVENTORY DB] : Found no inventory item with ID : {0}", itemID);
+
+ m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID);
return null;
}
@@ -424,7 +425,7 @@ namespace OpenSim.Data.MSSQL
command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
command.Parameters.Add(database.CreateParameter("invType", item.InvType));
- command.Parameters.Add(database.CreateParameter("creatorID", item.Creator));
+ command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorId));
command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions));
@@ -441,7 +442,7 @@ namespace OpenSim.Data.MSSQL
}
catch (Exception e)
{
- m_log.Error("[INVENTORY DB] Error inserting item :" + e.Message);
+ m_log.Error("[INVENTORY DB]: Error inserting item :" + e.Message);
}
}
@@ -498,7 +499,7 @@ namespace OpenSim.Data.MSSQL
command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
command.Parameters.Add(database.CreateParameter("invType", item.InvType));
- command.Parameters.Add(database.CreateParameter("creatorID", item.Creator));
+ command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorIdAsUuid));
command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice));
@@ -515,7 +516,7 @@ namespace OpenSim.Data.MSSQL
}
catch (Exception e)
{
- m_log.Error("[INVENTORY DB] Error updating item :" + e.Message);
+ m_log.Error("[INVENTORY DB]: Error updating item :" + e.Message);
}
}
}
@@ -538,7 +539,7 @@ namespace OpenSim.Data.MSSQL
}
catch (Exception e)
{
- m_log.Error("[INVENTORY DB] Error deleting item :" + e.Message);
+ m_log.Error("[INVENTORY DB]: Error deleting item :" + e.Message);
}
}
}
@@ -725,7 +726,7 @@ namespace OpenSim.Data.MSSQL
item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]);
item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]);
item.InvType = Convert.ToInt32(reader["invType"].ToString());
- item.Creator = new UUID((Guid)reader["creatorID"]);
+ item.CreatorId = ((Guid)reader["creatorID"]).ToString();
item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]);
@@ -740,7 +741,7 @@ namespace OpenSim.Data.MSSQL
}
catch (SqlException e)
{
- m_log.Error("[INVENTORY DB] Error reading inventory item :" + e.Message);
+ m_log.Error("[INVENTORY DB]: Error reading inventory item :" + e.Message);
}
return null;
@@ -764,7 +765,7 @@ namespace OpenSim.Data.MSSQL
}
catch (SqlException e)
{
- m_log.Error("[INVENTORY DB] Error deleting folder :" + e.Message);
+ m_log.Error("[INVENTORY DB]: Error deleting folder :" + e.Message);
}
}
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index a5312b5..7092096 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -306,22 +306,20 @@ namespace OpenSim.Data.MySQL
try
{
InventoryItemBase item = new InventoryItemBase();
+ item.CreatorId = (string)reader["creatorID"];
+
// Be a bit safer in parsing these because the
// database doesn't enforce them to be not null, and
// the inventory still works if these are weird in the
// db
-
UUID Owner = UUID.Zero;
- UUID Creator = UUID.Zero;
UUID GroupID = UUID.Zero;
UUID.TryParse((string)reader["avatarID"], out Owner);
- UUID.TryParse((string)reader["creatorID"], out Creator);
UUID.TryParse((string)reader["groupID"], out GroupID);
- item.Owner = Owner;
- item.Creator = Creator;
+ item.Owner = Owner;
item.GroupID = GroupID;
- // Rest of the parsing. If these UUID's fail, we're dead anyway
+ // Rest of the parsing. If these UUID's fail, we're dead anyway
item.ID = new UUID((string) reader["inventoryID"]);
item.AssetID = new UUID((string) reader["assetID"]);
item.AssetType = (int) reader["assetType"];
@@ -480,7 +478,7 @@ namespace OpenSim.Data.MySQL
result.Parameters.AddWithValue("?inventoryCurrentPermissions",
item.CurrentPermissions.ToString());
result.Parameters.AddWithValue("?invType", item.InvType);
- result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
+ result.Parameters.AddWithValue("?creatorID", item.CreatorId);
result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions);
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index bd18c11..aedcd82 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Data.SQLite
item.InvType = Convert.ToInt32(row["invType"]);
item.Folder = new UUID((string) row["parentFolderID"]);
item.Owner = new UUID((string) row["avatarID"]);
- item.Creator = new UUID((string) row["creatorsID"]);
+ item.CreatorId = (string)row["creatorsID"];
item.Name = (string) row["inventoryName"];
item.Description = (string) row["inventoryDescription"];
@@ -176,7 +176,7 @@ namespace OpenSim.Data.SQLite
}
///
- ///
+ /// Fill a database row with item data
///
///
///
@@ -188,7 +188,7 @@ namespace OpenSim.Data.SQLite
row["invType"] = item.InvType;
row["parentFolderID"] = Util.ToRawUuidString(item.Folder);
row["avatarID"] = Util.ToRawUuidString(item.Owner);
- row["creatorsID"] = Util.ToRawUuidString(item.Creator);
+ row["creatorsID"] = Util.ToRawUuidString(item.CreatorIdAsUuid);
row["inventoryName"] = item.Name;
row["inventoryDescription"] = item.Description;
@@ -281,7 +281,7 @@ namespace OpenSim.Data.SQLite
DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.ID));
if (inventoryRow == null)
{
- if (! add)
+ if (!add)
m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID);
inventoryRow = inventoryItemTable.NewRow();
diff --git a/OpenSim/Data/Tests/BasicInventoryTest.cs b/OpenSim/Data/Tests/BasicInventoryTest.cs
index 65c61cd..eed6cab 100644
--- a/OpenSim/Data/Tests/BasicInventoryTest.cs
+++ b/OpenSim/Data/Tests/BasicInventoryTest.cs
@@ -271,7 +271,7 @@ namespace OpenSim.Data.Tests
i.ID = id;
i.Folder = parent;
i.Owner = owner;
- i.Creator = owner;
+ i.CreatorId = owner.ToString();
i.Name = name;
i.Description = name;
i.AssetID = asset;
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index e7ce8af..0e87c8c 100644
--- a/OpenSim/Data/Tests/BasicRegionTest.cs
+++ b/OpenSim/Data/Tests/BasicRegionTest.cs
@@ -606,7 +606,7 @@ namespace OpenSim.Data.Tests
UUID owner = UUID.Random();
i.Owner = owner;
UUID creator = UUID.Random();
- i.Creator = creator;
+ i.CreatorId = creator.ToString();
string name = RandomName();
i.Name = name;
i.Description = name;
@@ -982,7 +982,7 @@ namespace OpenSim.Data.Tests
i.ID = id;
i.Folder = parent;
i.Owner = owner;
- i.Creator = owner;
+ i.CreatorId = owner.ToString();
i.Name = name;
i.Description = name;
i.AssetID = asset;
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 93f126f..ec62ed2 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
{
InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner;
- item.Creator = libOwner;
+ item.CreatorId = libOwner.ToString();
item.ID = inventoryID;
item.AssetID = assetID;
item.Description = description;
@@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Cache
{
InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner;
- item.Creator = libOwner;
+ item.CreatorId = libOwner.ToString();
item.ID = new UUID(config.GetString("inventoryID", ID.ToString()));
item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString()));
item.Folder = new UUID(config.GetString("folderID", ID.ToString()));
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 1423e3a..a2e8042 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Capabilities
llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower();
llsdItem.permissions = new LLSDPermissions();
- llsdItem.permissions.creator_id = invItem.Creator;
+ llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
llsdItem.permissions.group_id = UUID.Zero;
@@ -789,7 +789,7 @@ namespace OpenSim.Framework.Communications.Capabilities
InventoryItemBase item = new InventoryItemBase();
item.Owner = m_agentID;
- item.Creator = m_agentID;
+ item.CreatorId = m_agentID.ToString();
item.ID = inventoryItem;
item.AssetID = asset.FullID;
item.Description = assetDescription;
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 21683c4..ae3777c 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -53,8 +53,16 @@ namespace OpenSim.Framework
///
/// The creator of this item
///
- private UUID _creator;
+ private string m_creatorId = String.Empty;
+
+ ///
+ /// The creator of this item expressed as a UUID
+ ///
+ private UUID m_creatorIdAsUuid = UUID.Zero;
+ ///
+ ///
+ ///
private uint _nextPermissions;
///
@@ -129,10 +137,27 @@ namespace OpenSim.Framework
set { _folder = value; }
}
- public UUID Creator
+ ///
+ /// The creator ID
+ ///
+ public string CreatorId
+ {
+ get { return m_creatorId; }
+ set
+ {
+ m_creatorId = value;
+
+ // For now, all IDs are UUIDs
+ UUID.TryParse(m_creatorId, out m_creatorIdAsUuid);
+ }
+ }
+
+ ///
+ /// The creator ID expressed as a UUID
+ ///
+ public UUID CreatorIdAsUuid
{
- get { return _creator; }
- set { _creator = value; }
+ get { return m_creatorIdAsUuid; }
}
public string Description
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs
index 06b0220..e19160a 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/InventoryArchivePlugin.cs
@@ -216,7 +216,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
writer.WriteString(item.InvType.ToString());
writer.WriteEndElement();
writer.WriteStartElement("CreatorUUID");
- writer.WriteString(item.Creator.ToString());
+ writer.WriteString(item.CreatorId);
writer.WriteEndElement();
writer.WriteStartElement("CreationDate");
writer.WriteString(item.CreationDate.ToString());
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs
index c226a26..a905473 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs
@@ -598,7 +598,6 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
{
InventoryItemBase item = new InventoryItemBase();
-
try
{
using (XmlReader reader = XmlReader.Create(stream))
@@ -624,9 +623,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
ReadUUID(reader, "Folder", out dummyUUID);
item.Folder = dummyUUID;
- ReadUUID(reader, "Creator", out dummyUUID);
- item.Creator = dummyUUID;
+ item.CreatorId = reader.ReadElementContentAsString("Creator", String.Empty);
item.Description = reader.ReadElementContentAsString("Description", String.Empty);
uint dummyUInt;
@@ -757,7 +755,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
writer.WriteElementString("InvType", XmlConvert.ToString(item.InvType));
WriteUUID(writer, "Folder", item.Folder);
WriteUUID(writer, "Owner", item.Owner);
- WriteUUID(writer, "Creator", item.Creator);
+ writer.WriteElementString("Creator", item.CreatorId);
writer.WriteElementString("Name", item.Name);
writer.WriteElementString("Description", item.Description);
writer.WriteElementString("NextPermissions", XmlConvert.ToString(item.NextPermissions));
diff --git a/OpenSim/Grid/AssetInventoryServer/Utils.cs b/OpenSim/Grid/AssetInventoryServer/Utils.cs
index 58b0c67..c79a426 100644
--- a/OpenSim/Grid/AssetInventoryServer/Utils.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Utils.cs
@@ -515,7 +515,7 @@ namespace OpenSim.Grid.AssetInventoryServer
else if (Reader.LocalName == "Creator" && Reader.NamespaceURI == "" && !b13)
{
b13 = true;
- ob.@Creator = ReadObject_UUID(false, true);
+ ob.@CreatorId = Reader.ReadElementString();
}
else if (Reader.LocalName == "Owner" && Reader.NamespaceURI == "" && !b12)
{
@@ -876,7 +876,7 @@ namespace OpenSim.Grid.AssetInventoryServer
WriteElementString("InvType", "", ob.@InvType.ToString(CultureInfo.InvariantCulture));
WriteObject_UUID(ob.@Folder, "Folder", "", false, false, true);
WriteObject_UUID(ob.@Owner, "Owner", "", false, false, true);
- WriteObject_UUID(ob.@Creator, "Creator", "", false, false, true);
+ WriteElementString("Creator", "", ob.@CreatorId);
WriteElementString("Name", "", ob.@Name);
WriteElementString("Description", "", ob.@Description);
WriteElementString("NextPermissions", "", ob.@NextPermissions.ToString(CultureInfo.InvariantCulture));
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 891fa9e..7e99337 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1729,7 +1729,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock();
descend.ItemData[i].ItemID = item.ID;
descend.ItemData[i].AssetID = item.AssetID;
- descend.ItemData[i].CreatorID = item.Creator;
+ descend.ItemData[i].CreatorID = item.CreatorIdAsUuid;
descend.ItemData[i].BaseMask = item.BasePermissions;
descend.ItemData[i].Description = LLUtil.StringToPacketBytes(item.Description);
descend.ItemData[i].EveryoneMask = item.EveryOnePermissions;
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock();
inventoryReply.InventoryData[0].ItemID = item.ID;
inventoryReply.InventoryData[0].AssetID = item.AssetID;
- inventoryReply.InventoryData[0].CreatorID = item.Creator;
+ inventoryReply.InventoryData[0].CreatorID = item.CreatorIdAsUuid;
inventoryReply.InventoryData[0].BaseMask = item.BasePermissions;
inventoryReply.InventoryData[0].CreationDate = item.CreationDate;
@@ -1950,13 +1950,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
inventoryReply.InventoryData[0].SaleType = item.SaleType;
inventoryReply.InventoryData[0].CRC =
- Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType,
- inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID,
- inventoryReply.InventoryData[0].GroupID, 100,
- inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID,
- inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID,
- FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS,
- FULL_MASK_PERMISSIONS);
+ Helpers.InventoryCRC(
+ 1000, 0, inventoryReply.InventoryData[0].InvType,
+ inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID,
+ inventoryReply.InventoryData[0].GroupID, 100,
+ inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID,
+ inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID,
+ FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS,
+ FULL_MASK_PERMISSIONS);
inventoryReply.Header.Zerocoded = true;
OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
}
@@ -2075,7 +2076,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
itemBlock.ItemID = item.ID;
itemBlock.AssetID = item.AssetID;
- itemBlock.CreatorID = item.Creator;
+ itemBlock.CreatorID = item.CreatorIdAsUuid;
itemBlock.BaseMask = item.BasePermissions;
itemBlock.Description = LLUtil.StringToPacketBytes(item.Description);
itemBlock.EveryoneMask = item.EveryOnePermissions;
@@ -2138,7 +2139,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock();
bulkUpdate.ItemData[0].ItemID = item.ID;
bulkUpdate.ItemData[0].AssetID = item.AssetID;
- bulkUpdate.ItemData[0].CreatorID = item.Creator;
+ bulkUpdate.ItemData[0].CreatorID = item.CreatorIdAsUuid;
bulkUpdate.ItemData[0].BaseMask = item.BasePermissions;
bulkUpdate.ItemData[0].CreationDate = item.CreationDate;
bulkUpdate.ItemData[0].Description = LLUtil.StringToPacketBytes(item.Description);
@@ -2186,7 +2187,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock();
InventoryReply.InventoryData[0].ItemID = Item.ID;
InventoryReply.InventoryData[0].AssetID = Item.AssetID;
- InventoryReply.InventoryData[0].CreatorID = Item.Creator;
+ InventoryReply.InventoryData[0].CreatorID = Item.CreatorIdAsUuid;
InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions;
InventoryReply.InventoryData[0].Description = LLUtil.StringToPacketBytes(Item.Description);
InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions;
@@ -6746,7 +6747,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
InventoryItemBase item = new InventoryItemBase();
item.ID = rezScriptx.InventoryBlock.ItemID;
item.Folder = rezScriptx.InventoryBlock.FolderID;
- item.Creator = rezScriptx.InventoryBlock.CreatorID;
+ item.CreatorId = rezScriptx.InventoryBlock.CreatorID.ToString();
item.Owner = rezScriptx.InventoryBlock.OwnerID;
item.BasePermissions = rezScriptx.InventoryBlock.BaseMask;
item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask;
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 8bdf084..a8e5ae3 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -211,7 +211,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
}
-
private void DoCreateItem(uint callbackID)
{
m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset);
@@ -223,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{
InventoryItemBase item = new InventoryItemBase();
item.Owner = ourClient.AgentId;
- item.Creator = ourClient.AgentId;
+ item.CreatorId = ourClient.AgentId.ToString();
item.ID = UUID.Random();
item.AssetID = m_asset.FullID;
item.Description = m_description;
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index edb2c56..246cf55 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -819,7 +819,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
item.AssetType = (int)AssetType.CallingCard;
item.BasePermissions = (uint)PermissionMask.Copy;
item.CreationDate = Util.UnixTimeSinceEpoch();
- item.Creator = creator;
+ item.CreatorId = creator.ToString();
item.CurrentPermissions = item.BasePermissions;
item.Description = "";
item.EveryOnePermissions = (uint)PermissionMask.None;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 8dec2c4..8732e2e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
item.InvType = Convert.ToInt32(reader.ReadString());
reader.ReadEndElement();
reader.ReadStartElement("CreatorUUID");
- item.Creator = UUID.Parse(reader.ReadString());
+ item.CreatorId = reader.ReadString();
reader.ReadEndElement();
reader.ReadStartElement("CreationDate");
item.CreationDate = Convert.ToInt32(reader.ReadString());
@@ -329,7 +329,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
// Don't use the item ID that's in the file
item.ID = UUID.Random();
- item.Creator = m_userInfo.UserProfile.ID;
+ item.CreatorId = m_userInfo.UserProfile.ID.ToString();
item.Owner = m_userInfo.UserProfile.ID;
// Reset folder ID to the one in which we want to load it
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 90a51c3..f302696 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
writer.WriteString(inventoryItem.InvType.ToString());
writer.WriteEndElement();
writer.WriteStartElement("CreatorUUID");
- writer.WriteString(inventoryItem.Creator.ToString());
+ writer.WriteString(inventoryItem.CreatorId);
writer.WriteEndElement();
writer.WriteStartElement("CreationDate");
writer.WriteString(inventoryItem.CreationDate.ToString());
@@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_archive.WriteFile(filename, sw.ToString());
- UUID creatorId = inventoryItem.Creator;
+ UUID creatorId = inventoryItem.CreatorIdAsUuid;
// Record the creator of this item
m_userUuids[creatorId] = 1;
diff --git a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
index 8b2a5ca..87272a1 100644
--- a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
@@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
using System;
using System.Collections;
using System.IO;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 11cee7c..bebf234 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -478,7 +478,7 @@ namespace OpenSim.Region.Framework.Scenes
// Insert a copy of the item into the recipient
InventoryItemBase itemCopy = new InventoryItemBase();
itemCopy.Owner = recipient;
- itemCopy.Creator = item.Creator;
+ itemCopy.CreatorId = item.CreatorId;
itemCopy.ID = UUID.Random();
itemCopy.AssetID = item.AssetID;
itemCopy.Description = item.Description;
@@ -836,7 +836,7 @@ namespace OpenSim.Region.Framework.Scenes
{
InventoryItemBase item = new InventoryItemBase();
item.Owner = remoteClient.AgentId;
- item.Creator = remoteClient.AgentId;
+ item.CreatorId = remoteClient.AgentId.ToString();
item.ID = UUID.Random();
item.AssetID = asset.FullID;
item.Description = asset.Description;
@@ -1086,7 +1086,7 @@ namespace OpenSim.Region.Framework.Scenes
InventoryItemBase agentItem = new InventoryItemBase();
agentItem.ID = UUID.Random();
- agentItem.Creator = taskItem.CreatorID;
+ agentItem.CreatorId = taskItem.CreatorID.ToString();
agentItem.Owner = destAgent;
agentItem.AssetID = taskItem.AssetID;
agentItem.Description = taskItem.Description;
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes
taskItem.Type = itemBase.AssetType;
taskItem.InvType = itemBase.InvType;
taskItem.OwnerID = itemBase.Owner;
- taskItem.CreatorID = itemBase.Creator;
+ taskItem.CreatorID = itemBase.CreatorIdAsUuid;
taskItem.BasePermissions = itemBase.BasePermissions;
taskItem.CurrentPermissions = itemBase.CurrentPermissions;
taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
@@ -1946,12 +1946,11 @@ namespace OpenSim.Region.Framework.Scenes
}
item = new InventoryItemBase();
- item.Creator = objectGroup.RootPart.CreatorID;
+ item.CreatorId = objectGroup.RootPart.CreatorID.ToString();
item.ID = UUID.Random();
item.InvType = (int)InventoryType.Object;
item.Folder = folder.ID;
item.Owner = userInfo.UserProfile.ID;
-
}
AssetBase asset = CreateAsset(
@@ -2115,6 +2114,7 @@ namespace OpenSim.Region.Framework.Scenes
CachedUserInfo userInfo =
CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
+
if (userInfo != null)
{
AssetBase asset = CreateAsset(
@@ -2125,7 +2125,7 @@ namespace OpenSim.Region.Framework.Scenes
CommsManager.AssetCache.AddAsset(asset);
InventoryItemBase item = new InventoryItemBase();
- item.Creator = grp.RootPart.CreatorID;
+ item.CreatorId = grp.RootPart.CreatorID.ToString();
item.Owner = remoteClient.AgentId;
item.ID = UUID.Random();
item.AssetID = asset.FullID;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3266703..041d981 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3368,7 +3368,7 @@ namespace OpenSim.Region.Framework.Scenes
CommsManager.AssetCache.AddAsset(asset);
InventoryItemBase item = new InventoryItemBase();
- item.Creator = part.CreatorID;
+ item.CreatorId = part.CreatorID.ToString();
item.ID = UUID.Random();
item.Owner = remoteClient.AgentId;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 5c47710..4c2b50f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -151,7 +151,7 @@ namespace OpenSim.Region.Framework.Scenes
taskItem.Name = item.Name;
taskItem.Description = item.Description;
taskItem.OwnerID = part.OwnerID; // Transfer ownership
- taskItem.CreatorID = item.Creator;
+ taskItem.CreatorID = item.CreatorIdAsUuid;
taskItem.Type = item.AssetType;
taskItem.InvType = item.InvType;
--
cgit v1.1