aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-05-13 03:24:19 +0100
committerJustin Clark-Casey (justincc)2011-05-13 03:24:19 +0100
commit5f9edd195c702fac57ab76bca1c0357bce224868 (patch)
tree46c2c2e155987c77abed27af3169315fcf97bd1f /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentOne more debug message for offline IMs. (diff)
downloadopensim-SC_OLD-5f9edd195c702fac57ab76bca1c0357bce224868.zip
opensim-SC_OLD-5f9edd195c702fac57ab76bca1c0357bce224868.tar.gz
opensim-SC_OLD-5f9edd195c702fac57ab76bca1c0357bce224868.tar.bz2
opensim-SC_OLD-5f9edd195c702fac57ab76bca1c0357bce224868.tar.xz
Fix broken inventory links on viewer 2.
It appears that if the viewer requests a folder containing links, we must also send the folders that contain the link targets first. This was tested with Kokua 0.1.0 WIP though I predict it will also work with other viewer 2s
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index a65ceeb..3bf2c2b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1382,11 +1382,28 @@ namespace OpenSim.Region.Framework.Scenes
1382 InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId); 1382 InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId);
1383 containingFolder = InventoryService.GetFolder(containingFolder); 1383 containingFolder = InventoryService.GetFolder(containingFolder);
1384 1384
1385 //m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", 1385// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}",
1386 // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); 1386// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName);
1387 1387
1388 if (containingFolder != null && containingFolder != null) 1388 if (containingFolder != null && containingFolder != null)
1389 {
1390 // If the folder requested contains links, then we need to send those folders first, otherwise the links
1391 // will be broken in the viewer.
1392 HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
1393 foreach (InventoryItemBase item in contents.Items)
1394 {
1395 if (item.AssetType == (int)AssetType.Link)
1396 {
1397 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID));
1398 linkedItemFolderIdsToSend.Add(linkedItem.Folder);
1399 }
1400 }
1401
1402 foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
1403 SendInventoryUpdate(client, new InventoryFolderBase(linkedItemFolderId), false, true);
1404
1389 client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); 1405 client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems);
1406 }
1390 } 1407 }
1391 1408
1392 /// <summary> 1409 /// <summary>