diff options
author | Melanie | 2012-11-13 10:49:24 +0000 |
---|---|---|
committer | Melanie | 2012-11-13 10:49:24 +0000 |
commit | af01a2320a4449b8852248a7b7264fde7e5ab726 (patch) | |
tree | c8b704c7efdc603751acb2d3c47a2873848413ac /OpenSim/Region/CoreModules/Avatar | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Moved the WindModule and its own plugins out of .addin.xml (diff) | |
download | opensim-SC_OLD-af01a2320a4449b8852248a7b7264fde7e5ab726.zip opensim-SC_OLD-af01a2320a4449b8852248a7b7264fde7e5ab726.tar.gz opensim-SC_OLD-af01a2320a4449b8852248a7b7264fde7e5ab726.tar.bz2 opensim-SC_OLD-af01a2320a4449b8852248a7b7264fde7e5ab726.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 137 |
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 5d20524..d41691a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -314,73 +314,76 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
314 | } | 314 | } |
315 | } | 315 | } |
316 | 316 | ||
317 | // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name> | 317 | // Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes |
318 | // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis | 318 | // to inventory folder versioning allowing the viewer to move the received folder itself as happens on the |
319 | // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously | 319 | // LL grid. Doing it again server-side then wrongly does a second create and move |
320 | // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. | 320 | // // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name> |
321 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | 321 | // // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis |
322 | { | 322 | // // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously |
323 | UUID destinationFolderID = UUID.Zero; | 323 | // // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. |
324 | 324 | // else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | |
325 | if (im.binaryBucket != null && im.binaryBucket.Length >= 16) | 325 | // { |
326 | { | 326 | // UUID destinationFolderID = UUID.Zero; |
327 | destinationFolderID = new UUID(im.binaryBucket, 0); | 327 | // |
328 | } | 328 | // if (im.binaryBucket != null && im.binaryBucket.Length >= 16) |
329 | 329 | // { | |
330 | if (destinationFolderID != UUID.Zero) | 330 | // destinationFolderID = new UUID(im.binaryBucket, 0); |
331 | { | 331 | // } |
332 | InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); | 332 | // |
333 | if (destinationFolder == null) | 333 | // if (destinationFolderID != UUID.Zero) |
334 | { | 334 | // { |
335 | m_log.WarnFormat( | 335 | // InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); |
336 | "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", | 336 | // if (destinationFolder == null) |
337 | client.Name, scene.Name, destinationFolderID); | 337 | // { |
338 | 338 | // m_log.WarnFormat( | |
339 | return; | 339 | // "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", |
340 | } | 340 | // client.Name, scene.Name, destinationFolderID); |
341 | 341 | // | |
342 | IInventoryService invService = scene.InventoryService; | 342 | // return; |
343 | 343 | // } | |
344 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | 344 | // |
345 | 345 | // IInventoryService invService = scene.InventoryService; | |
346 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | 346 | // |
347 | item = invService.GetItem(item); | 347 | // UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip |
348 | InventoryFolderBase folder = null; | 348 | // |
349 | UUID? previousParentFolderID = null; | 349 | // InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); |
350 | 350 | // item = invService.GetItem(item); | |
351 | if (item != null) // It's an item | 351 | // InventoryFolderBase folder = null; |
352 | { | 352 | // UUID? previousParentFolderID = null; |
353 | previousParentFolderID = item.Folder; | 353 | // |
354 | item.Folder = destinationFolderID; | 354 | // if (item != null) // It's an item |
355 | 355 | // { | |
356 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); | 356 | // previousParentFolderID = item.Folder; |
357 | scene.AddInventoryItem(client, item); | 357 | // item.Folder = destinationFolderID; |
358 | } | 358 | // |
359 | else | 359 | // invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); |
360 | { | 360 | // scene.AddInventoryItem(client, item); |
361 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | 361 | // } |
362 | folder = invService.GetFolder(folder); | 362 | // else |
363 | 363 | // { | |
364 | if (folder != null) // It's a folder | 364 | // folder = new InventoryFolderBase(inventoryID, client.AgentId); |
365 | { | 365 | // folder = invService.GetFolder(folder); |
366 | previousParentFolderID = folder.ParentID; | 366 | // |
367 | folder.ParentID = destinationFolderID; | 367 | // if (folder != null) // It's a folder |
368 | invService.MoveFolder(folder); | 368 | // { |
369 | } | 369 | // previousParentFolderID = folder.ParentID; |
370 | } | 370 | // folder.ParentID = destinationFolderID; |
371 | 371 | // invService.MoveFolder(folder); | |
372 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). | 372 | // } |
373 | if (previousParentFolderID != null) | 373 | // } |
374 | { | 374 | // |
375 | InventoryFolderBase previousParentFolder | 375 | // // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). |
376 | = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); | 376 | // if (previousParentFolderID != null) |
377 | previousParentFolder = invService.GetFolder(previousParentFolder); | 377 | // { |
378 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); | 378 | // InventoryFolderBase previousParentFolder |
379 | 379 | // = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); | |
380 | scene.SendInventoryUpdate(client, destinationFolder, true, true); | 380 | // previousParentFolder = invService.GetFolder(previousParentFolder); |
381 | } | 381 | // scene.SendInventoryUpdate(client, previousParentFolder, true, true); |
382 | } | 382 | // |
383 | } | 383 | // scene.SendInventoryUpdate(client, destinationFolder, true, true); |
384 | // } | ||
385 | // } | ||
386 | // } | ||
384 | else if ( | 387 | else if ( |
385 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined | 388 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined |
386 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) | 389 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) |