diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ad015e7d66..0e448d1bfc 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1607,14 +1607,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]); else { +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sending inventory folder details packet to {0} for folder {1}", Name, folderID); OutPacket(currentPacket, ThrottleOutPacketType.Asset, false); currentPacket = null; } - } if (currentPacket != null) + { +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sending inventory folder details packet to {0} for folder {1}", Name, folderID); OutPacket(currentPacket, ThrottleOutPacketType.Asset, false); + } } private InventoryDescendentsPacket.FolderDataBlock CreateFolderDataBlock(InventoryFolderBase folder) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index a65ceeb335..3bf2c2b61e 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 InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId); containingFolder = InventoryService.GetFolder(containingFolder); - //m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", - // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); +// m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", +// contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); if (containingFolder != null && containingFolder != null) + { + // If the folder requested contains links, then we need to send those folders first, otherwise the links + // will be broken in the viewer. + HashSet linkedItemFolderIdsToSend = new HashSet(); + foreach (InventoryItemBase item in contents.Items) + { + if (item.AssetType == (int)AssetType.Link) + { + InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); + linkedItemFolderIdsToSend.Add(linkedItem.Folder); + } + } + + foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) + SendInventoryUpdate(client, new InventoryFolderBase(linkedItemFolderId), false, true); + client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); + } } /// diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index ab567fbcb0..e2d7208ff7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -499,6 +499,10 @@ namespace OpenSim.Region.Framework.Scenes public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder) { +// m_log.DebugFormat( +// "[USER INVENTORY]: HandleFetchInventoryDescendents() for {0}, folder={1}, fetchFolders={2}, fetchItems={3}, sortOrder={4}", +// remoteClient.Name, folderID, fetchFolders, fetchItems, sortOrder); + if (folderID == UUID.Zero) return; diff --git a/bin/OpenSim.exe.config b/bin/OpenSim.exe.config index eece04092f..4a49fc5631 100755 --- a/bin/OpenSim.exe.config +++ b/bin/OpenSim.exe.config @@ -14,7 +14,7 @@ - +