aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-11-13 04:15:21 +0000
committerJustin Clark-Casey (justincc)2012-11-13 04:15:21 +0000
commitf605a6242734bacc6dc4f224f0b7f9867ac8b432 (patch)
tree81bd6f443917b15bb0c1f4ba72532908109070ea /OpenSim
parentMore module cleanup: removed the CoreModules.Framework modules directives out... (diff)
downloadopensim-SC_OLD-f605a6242734bacc6dc4f224f0b7f9867ac8b432.zip
opensim-SC_OLD-f605a6242734bacc6dc4f224f0b7f9867ac8b432.tar.gz
opensim-SC_OLD-f605a6242734bacc6dc4f224f0b7f9867ac8b432.tar.bz2
opensim-SC_OLD-f605a6242734bacc6dc4f224f0b7f9867ac8b432.tar.xz
Disable code to get server-side to move given items to a destination folder on TaskInventoryAccepted.
This is because the fixes to inventory versioning (so that they better match viewer expections) now appear to allow the viewer to execute #RLV moves, as happens on the LL grid. Doing it again server-side now wrongly creates another child #RLV folder underneath the root one. As per http://opensimulator.org/mantis/view.php?id=6311
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs137
1 files changed, 70 insertions, 67 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 24208df..5d4fec1 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -298,73 +298,76 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
298 } 298 }
299 } 299 }
300 300
301 // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name> 301 // Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes
302 // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis 302 // to inventory folder versioning allowing the viewer to move the received folder itself as happens on the
303 // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously 303 // LL grid. Doing it again server-side then wrongly does a second create and move
304 // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. 304// // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
305 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) 305// // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
306 { 306// // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
307 UUID destinationFolderID = UUID.Zero; 307// // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
308 308// else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
309 if (im.binaryBucket != null && im.binaryBucket.Length >= 16) 309// {
310 { 310// UUID destinationFolderID = UUID.Zero;
311 destinationFolderID = new UUID(im.binaryBucket, 0); 311//
312 } 312// if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
313 313// {
314 if (destinationFolderID != UUID.Zero) 314// destinationFolderID = new UUID(im.binaryBucket, 0);
315 { 315// }
316 InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); 316//
317 if (destinationFolder == null) 317// if (destinationFolderID != UUID.Zero)
318 { 318// {
319 m_log.WarnFormat( 319// InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
320 "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", 320// if (destinationFolder == null)
321 client.Name, scene.Name, destinationFolderID); 321// {
322 322// m_log.WarnFormat(
323 return; 323// "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
324 } 324// client.Name, scene.Name, destinationFolderID);
325 325//
326 IInventoryService invService = scene.InventoryService; 326// return;
327 327// }
328 UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip 328//
329 329// IInventoryService invService = scene.InventoryService;
330 InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); 330//
331 item = invService.GetItem(item); 331// UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
332 InventoryFolderBase folder = null; 332//
333 UUID? previousParentFolderID = null; 333// InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
334 334// item = invService.GetItem(item);
335 if (item != null) // It's an item 335// InventoryFolderBase folder = null;
336 { 336// UUID? previousParentFolderID = null;
337 previousParentFolderID = item.Folder; 337//
338 item.Folder = destinationFolderID; 338// if (item != null) // It's an item
339 339// {
340 invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); 340// previousParentFolderID = item.Folder;
341 scene.AddInventoryItem(client, item); 341// item.Folder = destinationFolderID;
342 } 342//
343 else 343// invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
344 { 344// scene.AddInventoryItem(client, item);
345 folder = new InventoryFolderBase(inventoryID, client.AgentId); 345// }
346 folder = invService.GetFolder(folder); 346// else
347 347// {
348 if (folder != null) // It's a folder 348// folder = new InventoryFolderBase(inventoryID, client.AgentId);
349 { 349// folder = invService.GetFolder(folder);
350 previousParentFolderID = folder.ParentID; 350//
351 folder.ParentID = destinationFolderID; 351// if (folder != null) // It's a folder
352 invService.MoveFolder(folder); 352// {
353 } 353// previousParentFolderID = folder.ParentID;
354 } 354// folder.ParentID = destinationFolderID;
355 355// invService.MoveFolder(folder);
356 // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). 356// }
357 if (previousParentFolderID != null) 357// }
358 { 358//
359 InventoryFolderBase previousParentFolder 359// // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
360 = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); 360// if (previousParentFolderID != null)
361 previousParentFolder = invService.GetFolder(previousParentFolder); 361// {
362 scene.SendInventoryUpdate(client, previousParentFolder, true, true); 362// InventoryFolderBase previousParentFolder
363 363// = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
364 scene.SendInventoryUpdate(client, destinationFolder, true, true); 364// previousParentFolder = invService.GetFolder(previousParentFolder);
365 } 365// scene.SendInventoryUpdate(client, previousParentFolder, true, true);
366 } 366//
367 } 367// scene.SendInventoryUpdate(client, destinationFolder, true, true);
368// }
369// }
370// }
368 else if ( 371 else if (
369 im.dialog == (byte)InstantMessageDialog.InventoryDeclined 372 im.dialog == (byte)InstantMessageDialog.InventoryDeclined
370 || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) 373 || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)