From b5ac0e1ab811626ef5e904d6f67689dbd33433bc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 23 Jun 2015 14:24:55 -0700 Subject: FetchInventoryDescendents2: Signal to the viewer that folder with UUID.Zero is a bad folder. Don't even go to the backend to ask for it, because that will likely kill the sim. Apparently Firestorm requests folder Zero quite often. --- .../Handlers/FetchInventory/FetchInvDescHandler.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs') diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 1ad543b..5c7a3df 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs @@ -587,6 +587,15 @@ namespace OpenSim.Capabilities.Handlers AddLibraryFolders(fetchFolders, result); + // Filter folder Zero right here. Some viewers (Firestorm) send request for folder Zero, which doesn't make sense + // and can kill the sim (all root folders have parent_id Zero) + LLSDFetchInventoryDescendents zero = fetchFolders.Find(f => f.folder_id == UUID.Zero); + if (zero != null) + { + fetchFolders.Remove(zero); + BadFolder(zero, null, bad_folders); + } + if (fetchFolders.Count > 0) { UUID[] fids = new UUID[fetchFolders.Count]; @@ -600,7 +609,9 @@ namespace OpenSim.Capabilities.Handlers if (fetchedContents == null || (fetchedContents != null && fetchedContents.Length == 0)) { - //m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Could not get contents of multiple folders for user {0}", fetchFolders[0].owner_id); + m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Could not get contents of multiple folders for user {0}", fetchFolders[0].owner_id); + foreach (LLSDFetchInventoryDescendents freq in fetchFolders) + BadFolder(freq, null, bad_folders); return null; } -- cgit v1.1