Re-enable code disabled in f605a62
to allow a TaskInventoryAccepted message to nominate a non-root destination folder.
This is in relation to http://opensimulator.org/mantis/view.php?id=6311 This is after further analysis which shows the viewer expects the server to move the folder for #RLV give but then should be renaming the folder itself. For some reason this is not happening, possibly because we are not sending BulkUpdates or because we are not using transaction IDs properly. This needs to be fixed in the future. However, moving the folder even if the rename isn't correctly triggered in the viewer seems preferable to disabling this code altogether.0.7.5-pf-bulletsim
parent
cba1390ffd
commit
63cff49bce
|
@ -300,76 +300,74 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes
|
// XXX: This code was placed here to try and accomodate RLV which moves given folders named #RLV/~<name>
|
||||||
// to inventory folder versioning allowing the viewer to move the received folder itself as happens on the
|
// to the requested folder, which in this case is #RLV. However, it is the viewer that appears to be
|
||||||
// LL grid. Doing it again server-side then wrongly does a second create and move
|
// response from renaming the #RLV/~example folder to ~example. For some reason this is not yet
|
||||||
// // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
|
// happening, possibly because we are not sending the correct inventory update messages with the correct
|
||||||
// // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
|
// transaction IDs
|
||||||
// // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
|
else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
|
||||||
// // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
|
{
|
||||||
// else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
|
UUID destinationFolderID = UUID.Zero;
|
||||||
// {
|
|
||||||
// UUID destinationFolderID = UUID.Zero;
|
if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
|
||||||
//
|
{
|
||||||
// if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
|
destinationFolderID = new UUID(im.binaryBucket, 0);
|
||||||
// {
|
}
|
||||||
// destinationFolderID = new UUID(im.binaryBucket, 0);
|
|
||||||
// }
|
if (destinationFolderID != UUID.Zero)
|
||||||
//
|
{
|
||||||
// if (destinationFolderID != UUID.Zero)
|
InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
|
||||||
// {
|
if (destinationFolder == null)
|
||||||
// InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
|
{
|
||||||
// if (destinationFolder == null)
|
m_log.WarnFormat(
|
||||||
// {
|
"[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
|
||||||
// m_log.WarnFormat(
|
client.Name, scene.Name, destinationFolderID);
|
||||||
// "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
|
|
||||||
// client.Name, scene.Name, destinationFolderID);
|
return;
|
||||||
//
|
}
|
||||||
// return;
|
|
||||||
// }
|
IInventoryService invService = scene.InventoryService;
|
||||||
//
|
|
||||||
// IInventoryService invService = scene.InventoryService;
|
UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
|
||||||
//
|
|
||||||
// UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
|
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
||||||
//
|
item = invService.GetItem(item);
|
||||||
// InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
InventoryFolderBase folder = null;
|
||||||
// item = invService.GetItem(item);
|
UUID? previousParentFolderID = null;
|
||||||
// InventoryFolderBase folder = null;
|
|
||||||
// UUID? previousParentFolderID = null;
|
if (item != null) // It's an item
|
||||||
//
|
{
|
||||||
// if (item != null) // It's an item
|
previousParentFolderID = item.Folder;
|
||||||
// {
|
item.Folder = destinationFolderID;
|
||||||
// previousParentFolderID = item.Folder;
|
|
||||||
// item.Folder = destinationFolderID;
|
invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
|
||||||
//
|
scene.AddInventoryItem(client, item);
|
||||||
// invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
|
}
|
||||||
// scene.AddInventoryItem(client, item);
|
else
|
||||||
// }
|
{
|
||||||
// else
|
folder = new InventoryFolderBase(inventoryID, client.AgentId);
|
||||||
// {
|
folder = invService.GetFolder(folder);
|
||||||
// folder = new InventoryFolderBase(inventoryID, client.AgentId);
|
|
||||||
// folder = invService.GetFolder(folder);
|
if (folder != null) // It's a folder
|
||||||
//
|
{
|
||||||
// if (folder != null) // It's a folder
|
previousParentFolderID = folder.ParentID;
|
||||||
// {
|
folder.ParentID = destinationFolderID;
|
||||||
// previousParentFolderID = folder.ParentID;
|
invService.MoveFolder(folder);
|
||||||
// folder.ParentID = destinationFolderID;
|
}
|
||||||
// invService.MoveFolder(folder);
|
}
|
||||||
// }
|
|
||||||
// }
|
// Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
|
||||||
//
|
if (previousParentFolderID != null)
|
||||||
// // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
|
{
|
||||||
// if (previousParentFolderID != null)
|
InventoryFolderBase previousParentFolder
|
||||||
// {
|
= new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
|
||||||
// InventoryFolderBase previousParentFolder
|
previousParentFolder = invService.GetFolder(previousParentFolder);
|
||||||
// = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
|
scene.SendInventoryUpdate(client, previousParentFolder, true, true);
|
||||||
// previousParentFolder = invService.GetFolder(previousParentFolder);
|
|
||||||
// scene.SendInventoryUpdate(client, previousParentFolder, true, true);
|
scene.SendInventoryUpdate(client, destinationFolder, true, true);
|
||||||
//
|
}
|
||||||
// scene.SendInventoryUpdate(client, destinationFolder, true, true);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
else if (
|
else if (
|
||||||
im.dialog == (byte)InstantMessageDialog.InventoryDeclined
|
im.dialog == (byte)InstantMessageDialog.InventoryDeclined
|
||||||
|| im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)
|
|| im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)
|
||||||
|
|
Loading…
Reference in New Issue