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.
0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-27 02:56:08 +01:00
parent 1baadac59a
commit b5b2541d1a
1 changed files with 17 additions and 11 deletions

View File

@ -275,19 +275,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
{ {
if (m_TransferModule != null) if (m_TransferModule != null)
m_TransferModule.SendInstantMessage(im, delegate(bool success) { 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); // justincc - FIXME: Comment out for now. This code was added in commit db91044 Mon Aug 22 2011
folder = invService.GetFolder(folder); // 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)); // // Send BulkUpdateInventory
// IInventoryService invService = scene.InventoryService;
// If the user has left the scene by the time the message comes back then we can't send // UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item /folder, back from it's trip
// them the update. //
if (fromUser != null) // InventoryFolderBase folder = new InventoryFolderBase(inventoryEntityID, client.AgentId);
fromUser.ControllingClient.SendBulkUpdateInventory(folder); // 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);
}); });
} }
} }