diff options
author | Justin Clark-Casey (justincc) | 2012-11-17 01:23:29 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-11-17 01:23:29 +0000 |
commit | 392e84e55402166f5b4ec708d3338efe70a94c2e (patch) | |
tree | d7ebe51bd7c8364595892cda4491c72cb82c5555 | |
parent | Do not allow invariants to change on calls to XInventoryService.UpdateItem() (diff) | |
download | opensim-SC-392e84e55402166f5b4ec708d3338efe70a94c2e.zip opensim-SC-392e84e55402166f5b4ec708d3338efe70a94c2e.tar.gz opensim-SC-392e84e55402166f5b4ec708d3338efe70a94c2e.tar.bz2 opensim-SC-392e84e55402166f5b4ec708d3338efe70a94c2e.tar.xz |
Remove unnecessary ability to directly set InventoryItemBase.CreatorIdAsUuid
This was necessary historically but hasn't been for many years.
Can still get CreatorIdAsUuid, which is really just a UUID cached version of the string CreatorId
Diffstat (limited to '')
5 files changed, 9 insertions, 27 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 15fbddd..a75d10d 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -2314,7 +2314,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2314 | destinationItem.Description = item.Description; | 2314 | destinationItem.Description = item.Description; |
2315 | destinationItem.InvType = item.InvType; | 2315 | destinationItem.InvType = item.InvType; |
2316 | destinationItem.CreatorId = item.CreatorId; | 2316 | destinationItem.CreatorId = item.CreatorId; |
2317 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | ||
2318 | destinationItem.CreatorData = item.CreatorData; | 2317 | destinationItem.CreatorData = item.CreatorData; |
2319 | destinationItem.NextPermissions = item.NextPermissions; | 2318 | destinationItem.NextPermissions = item.NextPermissions; |
2320 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 2319 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
@@ -2369,7 +2368,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2369 | destinationItem.Description = item.Description; | 2368 | destinationItem.Description = item.Description; |
2370 | destinationItem.InvType = item.InvType; | 2369 | destinationItem.InvType = item.InvType; |
2371 | destinationItem.CreatorId = item.CreatorId; | 2370 | destinationItem.CreatorId = item.CreatorId; |
2372 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | ||
2373 | destinationItem.CreatorData = item.CreatorData; | 2371 | destinationItem.CreatorData = item.CreatorData; |
2374 | destinationItem.NextPermissions = item.NextPermissions; | 2372 | destinationItem.NextPermissions = item.NextPermissions; |
2375 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 2373 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
@@ -2482,7 +2480,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2482 | destinationItem.Description = item.Description; | 2480 | destinationItem.Description = item.Description; |
2483 | destinationItem.InvType = item.InvType; | 2481 | destinationItem.InvType = item.InvType; |
2484 | destinationItem.CreatorId = item.CreatorId; | 2482 | destinationItem.CreatorId = item.CreatorId; |
2485 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | ||
2486 | destinationItem.CreatorData = item.CreatorData; | 2483 | destinationItem.CreatorData = item.CreatorData; |
2487 | destinationItem.NextPermissions = item.NextPermissions; | 2484 | destinationItem.NextPermissions = item.NextPermissions; |
2488 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 2485 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
@@ -2788,7 +2785,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2788 | inventoryItem.Description = GetStringAttribute(item,"desc",""); | 2785 | inventoryItem.Description = GetStringAttribute(item,"desc",""); |
2789 | inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); | 2786 | inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); |
2790 | inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); | 2787 | inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); |
2791 | inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); | ||
2792 | inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", ""); | 2788 | inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", ""); |
2793 | inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff); | 2789 | inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff); |
2794 | inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); | 2790 | inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); |
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index a663680..3d45e76 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -87,16 +87,7 @@ namespace OpenSim.Framework | |||
87 | protected string m_creatorId; | 87 | protected string m_creatorId; |
88 | 88 | ||
89 | /// <value> | 89 | /// <value> |
90 | /// The UUID for the creator. This may be different from the canonical CreatorId. This property is used | 90 | /// The CreatorId expressed as a UUID.tely |
91 | /// for communication with the client over the Second Life protocol, since that protocol can only understand | ||
92 | /// UUIDs. As this is a basic framework class, this means that both the string creator id and the uuid | ||
93 | /// reference have to be settable separately | ||
94 | /// | ||
95 | /// Database plugins don't need to set this, it will be set by | ||
96 | /// upstream code (or set by the get accessor if left unset). | ||
97 | /// | ||
98 | /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately | ||
99 | /// every time there was communication with a UUID-only client. This may be much more expensive. | ||
100 | /// </value> | 91 | /// </value> |
101 | public UUID CreatorIdAsUuid | 92 | public UUID CreatorIdAsUuid |
102 | { | 93 | { |
@@ -109,20 +100,18 @@ namespace OpenSim.Framework | |||
109 | 100 | ||
110 | return m_creatorIdAsUuid; | 101 | return m_creatorIdAsUuid; |
111 | } | 102 | } |
112 | |||
113 | set | ||
114 | { | ||
115 | m_creatorIdAsUuid = value; | ||
116 | } | ||
117 | } | 103 | } |
118 | protected UUID m_creatorIdAsUuid = UUID.Zero; | 104 | protected UUID m_creatorIdAsUuid = UUID.Zero; |
119 | 105 | ||
120 | protected string m_creatorData = string.Empty; | 106 | /// <summary> |
107 | /// Extended creator information of the form <profile url>;<name> | ||
108 | /// </summary> | ||
121 | public string CreatorData // = <profile url>;<name> | 109 | public string CreatorData // = <profile url>;<name> |
122 | { | 110 | { |
123 | get { return m_creatorData; } | 111 | get { return m_creatorData; } |
124 | set { m_creatorData = value; } | 112 | set { m_creatorData = value; } |
125 | } | 113 | } |
114 | protected string m_creatorData = string.Empty; | ||
126 | 115 | ||
127 | /// <summary> | 116 | /// <summary> |
128 | /// Used by the DB layer to retrieve / store the entire user identification. | 117 | /// Used by the DB layer to retrieve / store the entire user identification. |
@@ -162,7 +151,6 @@ namespace OpenSim.Framework | |||
162 | name = parts[2]; | 151 | name = parts[2]; |
163 | 152 | ||
164 | m_creatorData += ';' + name; | 153 | m_creatorData += ';' + name; |
165 | |||
166 | } | 154 | } |
167 | } | 155 | } |
168 | } | 156 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index ee10d04..5069803 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -411,18 +411,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
411 | { | 411 | { |
412 | // m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId); | 412 | // m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId); |
413 | 413 | ||
414 | item.CreatorIdAsUuid = ospResolvedId; | 414 | // item.CreatorIdAsUuid = ospResolvedId; |
415 | 415 | ||
416 | // Don't preserve the OSPA in the creator id (which actually gets persisted to the | 416 | // Don't preserve the OSPA in the creator id (which actually gets persisted to the |
417 | // database). Instead, replace with the UUID that we found. | 417 | // database). Instead, replace with the UUID that we found. |
418 | item.CreatorId = ospResolvedId.ToString(); | 418 | item.CreatorId = ospResolvedId.ToString(); |
419 | |||
420 | item.CreatorData = string.Empty; | 419 | item.CreatorData = string.Empty; |
421 | } | 420 | } |
422 | else if (item.CreatorData == null || item.CreatorData == String.Empty) | 421 | else if (item.CreatorData == null || item.CreatorData == String.Empty) |
423 | { | 422 | { |
424 | item.CreatorId = m_userInfo.PrincipalID.ToString(); | 423 | item.CreatorId = m_userInfo.PrincipalID.ToString(); |
425 | item.CreatorIdAsUuid = new UUID(item.CreatorId); | 424 | // item.CreatorIdAsUuid = new UUID(item.CreatorId); |
426 | } | 425 | } |
427 | 426 | ||
428 | item.Owner = m_userInfo.PrincipalID; | 427 | item.Owner = m_userInfo.PrincipalID; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index 00727a4..db78da9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
134 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 134 | item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
135 | item1.AssetID = asset1.FullID; | 135 | item1.AssetID = asset1.FullID; |
136 | item1.GroupID = UUID.Random(); | 136 | item1.GroupID = UUID.Random(); |
137 | item1.CreatorIdAsUuid = m_uaLL1.PrincipalID; | 137 | item1.CreatorId = m_uaLL1.PrincipalID.ToString(); |
138 | item1.Owner = m_uaLL1.PrincipalID; | 138 | item1.Owner = m_uaLL1.PrincipalID; |
139 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | 139 | item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; |
140 | scene.AddInventoryItem(item1); | 140 | scene.AddInventoryItem(item1); |
@@ -157,7 +157,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
157 | coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); | 157 | coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); |
158 | coaItem.AssetID = coaAsset.FullID; | 158 | coaItem.AssetID = coaAsset.FullID; |
159 | coaItem.GroupID = UUID.Random(); | 159 | coaItem.GroupID = UUID.Random(); |
160 | coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID; | 160 | coaItem.CreatorId = m_uaLL1.PrincipalID.ToString(); |
161 | coaItem.Owner = m_uaLL1.PrincipalID; | 161 | coaItem.Owner = m_uaLL1.PrincipalID; |
162 | coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; | 162 | coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; |
163 | scene.AddInventoryItem(coaItem); | 163 | scene.AddInventoryItem(coaItem); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 4d7841b..a391275 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -781,7 +781,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
781 | invItem.CreationDate = item["CreationDate"].AsInteger(); | 781 | invItem.CreationDate = item["CreationDate"].AsInteger(); |
782 | invItem.CreatorId = item["CreatorID"].AsString(); | 782 | invItem.CreatorId = item["CreatorID"].AsString(); |
783 | invItem.CreatorData = item["CreatorData"].AsString(); | 783 | invItem.CreatorData = item["CreatorData"].AsString(); |
784 | invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID(); | ||
785 | invItem.Description = item["Description"].AsString(); | 784 | invItem.Description = item["Description"].AsString(); |
786 | invItem.Folder = item["ParentID"].AsUUID(); | 785 | invItem.Folder = item["ParentID"].AsUUID(); |
787 | invItem.ID = item["ID"].AsUUID(); | 786 | invItem.ID = item["ID"].AsUUID(); |