Apparently Firestorm sometimes sends duplicate folder ids on the same request (see http://opensimulator.org/mantis/view.php?id=7054#c28297). This was throwing the new inventory download code off.

Firestorm also sends requests for folder UUID.Zero, which doesn't exist, but doesn't cause any problems either -- it just fails. I'm leaving the warning message for now, just to keep an eye on which folders can't be found, but may remove it in the future.
fsassets
Diva Canto 2015-05-08 08:37:31 -07:00
parent 3548e39f9a
commit 3110b1661f
1 changed files with 8 additions and 2 deletions

View File

@ -109,7 +109,9 @@ namespace OpenSim.Capabilities.Handlers
continue; continue;
} }
folders.Add(llsdRequest); // Filter duplicate folder ids that bad viewers may send
if (folders.Find(f => f.folder_id == llsdRequest.folder_id) == null)
folders.Add(llsdRequest);
} }
if (folders.Count > 0) if (folders.Count > 0)
@ -540,6 +542,8 @@ namespace OpenSim.Capabilities.Handlers
List<LLSDFetchInventoryDescendents> libfolders = fetchFolders.FindAll(f => f.owner_id == m_LibraryService.LibraryRootFolder.Owner); List<LLSDFetchInventoryDescendents> libfolders = fetchFolders.FindAll(f => f.owner_id == m_LibraryService.LibraryRootFolder.Owner);
fetchFolders.RemoveAll(f => libfolders.Contains(f)); fetchFolders.RemoveAll(f => libfolders.Contains(f));
//m_log.DebugFormat("[XXX]: Found {0} library folders in request", libfolders.Count);
foreach (LLSDFetchInventoryDescendents f in libfolders) foreach (LLSDFetchInventoryDescendents f in libfolders)
{ {
if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(f.folder_id)) != null) if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(f.folder_id)) != null)
@ -553,7 +557,7 @@ namespace OpenSim.Capabilities.Handlers
ret.Collection.Version = fold.Version; ret.Collection.Version = fold.Version;
ret.Descendents = ret.Collection.Items.Count; ret.Descendents = ret.Collection.Items.Count;
// m_log.DebugFormat("[XXX]: Added libfolder {0} ({1})", ret.Collection.FolderID, ret.Collection.OwnerID);
result.Add(ret); result.Add(ret);
} }
} }
@ -578,6 +582,8 @@ namespace OpenSim.Capabilities.Handlers
foreach (LLSDFetchInventoryDescendents f in fetchFolders) foreach (LLSDFetchInventoryDescendents f in fetchFolders)
fids[i++] = f.folder_id; fids[i++] = f.folder_id;
//m_log.DebugFormat("[XXX]: {0}", string.Join(",", fids));
InventoryCollection[] fetchedContents = m_InventoryService.GetMultipleFoldersContent(fetchFolders[0].owner_id, fids); InventoryCollection[] fetchedContents = m_InventoryService.GetMultipleFoldersContent(fetchFolders[0].owner_id, fids);
if (fetchedContents == null || (fetchedContents != null && fetchedContents.Length == 0)) if (fetchedContents == null || (fetchedContents != null && fetchedContents.Length == 0))