diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 45 |
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 1c30a35..17242dc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -927,9 +927,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
927 | uint callbackID, string description, string name, | 927 | uint callbackID, string description, string name, |
928 | sbyte invType, sbyte type, UUID olditemID) | 928 | sbyte invType, sbyte type, UUID olditemID) |
929 | { | 929 | { |
930 | m_log.DebugFormat( | 930 | // m_log.DebugFormat( |
931 | "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}", | 931 | // "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}", |
932 | remoteClient.Name, name, folderID, olditemID); | 932 | // remoteClient.Name, name, folderID, olditemID); |
933 | 933 | ||
934 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) | 934 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) |
935 | return; | 935 | return; |
@@ -937,20 +937,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
937 | ScenePresence presence; | 937 | ScenePresence presence; |
938 | if (TryGetScenePresence(remoteClient.AgentId, out presence)) | 938 | if (TryGetScenePresence(remoteClient.AgentId, out presence)) |
939 | { | 939 | { |
940 | bool linkAlreadyExists = false; | 940 | // Disabled the check for duplicate links. |
941 | List<InventoryItemBase> existingItems = InventoryService.GetFolderItems(remoteClient.AgentId, folderID); | 941 | // |
942 | foreach (InventoryItemBase item in existingItems) | 942 | // When outfits are being adjusted, the viewer rapidly sends delete link messages followed by |
943 | if (item.AssetID == olditemID) | 943 | // create links. However, since these are handled asynchronously, the deletes do not complete before |
944 | linkAlreadyExists = true; | 944 | // the creates are handled. Therefore, we cannot enforce a duplicate link check. |
945 | 945 | // InventoryItemBase existingLink = null; | |
946 | if (linkAlreadyExists) | 946 | // List<InventoryItemBase> existingItems = InventoryService.GetFolderItems(remoteClient.AgentId, folderID); |
947 | { | 947 | // foreach (InventoryItemBase item in existingItems) |
948 | m_log.WarnFormat( | 948 | // if (item.AssetID == olditemID) |
949 | "[AGENT INVENTORY]: Ignoring request from {0} to create item link {1} in folder {2} pointing to {3} since a link already exists", | 949 | // existingLink = item; |
950 | remoteClient.Name, name, folderID, olditemID); | 950 | // |
951 | 951 | // if (existingLink != null) | |
952 | return; | 952 | // { |
953 | } | 953 | // m_log.WarnFormat( |
954 | // "[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", | ||
955 | // remoteClient.Name, name, folderID, olditemID, existingLink.Name, existingLink.ID); | ||
956 | // | ||
957 | // return; | ||
958 | // } | ||
954 | 959 | ||
955 | AssetBase asset = new AssetBase(); | 960 | AssetBase asset = new AssetBase(); |
956 | asset.FullID = olditemID; | 961 | asset.FullID = olditemID; |
@@ -978,7 +983,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
978 | /// <param name="itemID"></param> | 983 | /// <param name="itemID"></param> |
979 | private void RemoveInventoryItem(IClientAPI remoteClient, List<UUID> itemIDs) | 984 | private void RemoveInventoryItem(IClientAPI remoteClient, List<UUID> itemIDs) |
980 | { | 985 | { |
981 | //m_log.Debug("[SCENE INVENTORY]: user " + remoteClient.AgentId); | 986 | // m_log.DebugFormat( |
987 | // "[AGENT INVENTORY]: Removing inventory items {0} for {1}", | ||
988 | // string.Join(",", itemIDs.ConvertAll<string>(uuid => uuid.ToString()).ToArray()), | ||
989 | // remoteClient.Name); | ||
990 | |||
982 | InventoryService.DeleteItems(remoteClient.AgentId, itemIDs); | 991 | InventoryService.DeleteItems(remoteClient.AgentId, itemIDs); |
983 | } | 992 | } |
984 | 993 | ||