From 76c50d23f2920e391358d5c98cba11d11021cbb8 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 27 Oct 2011 02:56:08 +0100 Subject: [PATCH] Comment out inventory folder bulk update code on InventoryAccepted message introduced in commit db91044 on Aug 22 2011 This should be unecessary since the folder update is already made at the time of the offer (and moved to trash if not accepted). This code was also not taking into account the situation where an item was accepted. Needs more fixing if this results in an aggression elsewhere. --- .../Transfer/InventoryTransferModule.cs | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index f46d9f74d2..19c774f7c6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -275,19 +275,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer { if (m_TransferModule != null) m_TransferModule.SendInstantMessage(im, delegate(bool success) { - // Send BulkUpdateInventory - IInventoryService invService = scene.InventoryService; - UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item /folder, back from it's trip - InventoryFolderBase folder = new InventoryFolderBase(inventoryEntityID, client.AgentId); - folder = invService.GetFolder(folder); + // justincc - FIXME: Comment out for now. This code was added in commit db91044 Mon Aug 22 2011 + // and is apparently supposed to fix bulk inventory updates after accepting items. But + // instead it appears to cause two copies of an accepted folder for the receiving user in + // at least some cases. Folder/item update is already done when the offer is made (see code above) - ScenePresence fromUser = scene.GetScenePresence(new UUID(im.fromAgentID)); - - // If the user has left the scene by the time the message comes back then we can't send - // them the update. - if (fromUser != null) - fromUser.ControllingClient.SendBulkUpdateInventory(folder); +// // Send BulkUpdateInventory +// IInventoryService invService = scene.InventoryService; +// UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item /folder, back from it's trip +// +// InventoryFolderBase folder = new InventoryFolderBase(inventoryEntityID, client.AgentId); +// folder = invService.GetFolder(folder); +// +// ScenePresence fromUser = scene.GetScenePresence(new UUID(im.fromAgentID)); +// +// // If the user has left the scene by the time the message comes back then we can't send +// // them the update. +// if (fromUser != null) +// fromUser.ControllingClient.SendBulkUpdateInventory(folder); }); } }