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