aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index f37f94a..30421d4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -52,6 +52,11 @@ namespace OpenSim.Region.Framework.Scenes
52 protected AsyncSceneObjectGroupDeleter m_asyncSceneObjectDeleter; 52 protected AsyncSceneObjectGroupDeleter m_asyncSceneObjectDeleter;
53 53
54 /// <summary> 54 /// <summary>
55 /// Allows inventory details to be sent to clients asynchronously
56 /// </summary>
57 protected AsyncInventorySender m_asyncInventorySender;
58
59 /// <summary>
55 /// Start all the scripts in the scene which should be started. 60 /// Start all the scripts in the scene which should be started.
56 /// </summary> 61 /// </summary>
57 public void CreateScriptInstances() 62 public void CreateScriptInstances()
@@ -1328,7 +1333,7 @@ namespace OpenSim.Region.Framework.Scenes
1328// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", 1333// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}",
1329// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); 1334// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName);
1330 1335
1331 if (containingFolder != null && containingFolder != null) 1336 if (containingFolder != null)
1332 { 1337 {
1333 // If the folder requested contains links, then we need to send those folders first, otherwise the links 1338 // If the folder requested contains links, then we need to send those folders first, otherwise the links
1334 // will be broken in the viewer. 1339 // will be broken in the viewer.
@@ -1340,15 +1345,25 @@ namespace OpenSim.Region.Framework.Scenes
1340 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); 1345 InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID));
1341 1346
1342 // Take care of genuinely broken links where the target doesn't exist 1347 // Take care of genuinely broken links where the target doesn't exist
1343 if (linkedItem != null) 1348 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
1344 linkedItemFolderIdsToSend.Add(linkedItem.Folder); 1349 // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
1350 // rather than having to keep track of every folder requested in the recursion.
1351 if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
1352 {
1353 // We don't need to send the folder if source and destination of the link are in the same
1354 // folder.
1355 if (linkedItem.Folder != containingFolder.ID)
1356 linkedItemFolderIdsToSend.Add(linkedItem.Folder);
1357 }
1345 } 1358 }
1346 } 1359 }
1347 1360
1348 foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) 1361 foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
1349 SendInventoryUpdate(client, new InventoryFolderBase(linkedItemFolderId), false, true); 1362 SendInventoryUpdate(client, new InventoryFolderBase(linkedItemFolderId), false, true);
1350 1363
1351 client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); 1364 client.SendInventoryFolderDetails(
1365 client.AgentId, folder.ID, contents.Items, contents.Folders,
1366 containingFolder.Version, fetchFolders, fetchItems);
1352 } 1367 }
1353 } 1368 }
1354 1369