diff options
author | Diva Canto | 2012-11-12 21:15:35 -0800 |
---|---|---|
committer | Diva Canto | 2012-11-12 21:15:35 -0800 |
commit | 99ccd4ea440c756daadd4d26ab3994d21c3e252a (patch) | |
tree | 3692bb1a87223342425344c928cc387e049742cb | |
parent | Another 10 modules' directives moved from .addin.xml (diff) | |
parent | minor: Add some explanative method doc to SceneHelpers.SetupSceneModules() (diff) | |
download | opensim-SC_OLD-99ccd4ea440c756daadd4d26ab3994d21c3e252a.zip opensim-SC_OLD-99ccd4ea440c756daadd4d26ab3994d21c3e252a.tar.gz opensim-SC_OLD-99ccd4ea440c756daadd4d26ab3994d21c3e252a.tar.bz2 opensim-SC_OLD-99ccd4ea440c756daadd4d26ab3994d21c3e252a.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 137 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 4 |
2 files changed, 74 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) |
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 939fc33..ea3e348 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -350,6 +350,10 @@ namespace OpenSim.Tests.Common | |||
350 | /// </summary> | 350 | /// </summary> |
351 | /// <remarks> | 351 | /// <remarks> |
352 | /// If called directly, then all the modules must be shared modules. | 352 | /// If called directly, then all the modules must be shared modules. |
353 | /// | ||
354 | /// We are emulating here the normal calls made to setup region modules | ||
355 | /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). | ||
356 | /// TODO: Need to reuse normal runtime module code. | ||
353 | /// </remarks> | 357 | /// </remarks> |
354 | /// <param name="scenes"></param> | 358 | /// <param name="scenes"></param> |
355 | /// <param name="config"></param> | 359 | /// <param name="config"></param> |