aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs45
1 files changed, 27 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 3bf2c2b..e2420101 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -924,9 +924,9 @@ namespace OpenSim.Region.Framework.Scenes
924 uint callbackID, string description, string name, 924 uint callbackID, string description, string name,
925 sbyte invType, sbyte type, UUID olditemID) 925 sbyte invType, sbyte type, UUID olditemID)
926 { 926 {
927 m_log.DebugFormat( 927// m_log.DebugFormat(
928 "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}", 928// "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}",
929 remoteClient.Name, name, folderID, olditemID); 929// remoteClient.Name, name, folderID, olditemID);
930 930
931 if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) 931 if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
932 return; 932 return;
@@ -934,20 +934,25 @@ namespace OpenSim.Region.Framework.Scenes
934 ScenePresence presence; 934 ScenePresence presence;
935 if (TryGetScenePresence(remoteClient.AgentId, out presence)) 935 if (TryGetScenePresence(remoteClient.AgentId, out presence))
936 { 936 {
937 bool linkAlreadyExists = false; 937 // Disabled the check for duplicate links.
938 List<InventoryItemBase> existingItems = InventoryService.GetFolderItems(remoteClient.AgentId, folderID); 938 //
939 foreach (InventoryItemBase item in existingItems) 939 // When outfits are being adjusted, the viewer rapidly sends delete link messages followed by
940 if (item.AssetID == olditemID) 940 // create links. However, since these are handled asynchronously, the deletes do not complete before
941 linkAlreadyExists = true; 941 // the creates are handled. Therefore, we cannot enforce a duplicate link check.
942 942// InventoryItemBase existingLink = null;
943 if (linkAlreadyExists) 943// List<InventoryItemBase> existingItems = InventoryService.GetFolderItems(remoteClient.AgentId, folderID);
944 { 944// foreach (InventoryItemBase item in existingItems)
945 m_log.WarnFormat( 945// if (item.AssetID == olditemID)
946 "[AGENT INVENTORY]: Ignoring request from {0} to create item link {1} in folder {2} pointing to {3} since a link already exists", 946// existingLink = item;
947 remoteClient.Name, name, folderID, olditemID); 947//
948 948// if (existingLink != null)
949 return; 949// {
950 } 950// m_log.WarnFormat(
951// "[AGENT INVENTORY]: Ignoring request from {0} to create item link {1} in folder {2} pointing to {3} since a link named {4} with id {5} already exists",
952// remoteClient.Name, name, folderID, olditemID, existingLink.Name, existingLink.ID);
953//
954// return;
955// }
951 956
952 AssetBase asset = new AssetBase(); 957 AssetBase asset = new AssetBase();
953 asset.FullID = olditemID; 958 asset.FullID = olditemID;
@@ -975,7 +980,11 @@ namespace OpenSim.Region.Framework.Scenes
975 /// <param name="itemID"></param> 980 /// <param name="itemID"></param>
976 private void RemoveInventoryItem(IClientAPI remoteClient, List<UUID> itemIDs) 981 private void RemoveInventoryItem(IClientAPI remoteClient, List<UUID> itemIDs)
977 { 982 {
978 //m_log.Debug("[SCENE INVENTORY]: user " + remoteClient.AgentId); 983// m_log.DebugFormat(
984// "[AGENT INVENTORY]: Removing inventory items {0} for {1}",
985// string.Join(",", itemIDs.ConvertAll<string>(uuid => uuid.ToString()).ToArray()),
986// remoteClient.Name);
987
979 InventoryService.DeleteItems(remoteClient.AgentId, itemIDs); 988 InventoryService.DeleteItems(remoteClient.AgentId, itemIDs);
980 } 989 }
981 990