aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities')
-rw-r--r--OpenSim/Capabilities/Handlers/FetchInventoryDescendents/FetchInvDescHandler.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventoryDescendents/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventoryDescendents/FetchInvDescHandler.cs
index e4ce1f3..27666f7 100644
--- a/OpenSim/Capabilities/Handlers/FetchInventoryDescendents/FetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/FetchInventoryDescendents/FetchInvDescHandler.cs
@@ -109,7 +109,9 @@ namespace OpenSim.Capabilities.Handlers
109 continue; 109 continue;
110 } 110 }
111 111
112 folders.Add(llsdRequest); 112 // Filter duplicate folder ids that bad viewers may send
113 if (folders.Find(f => f.folder_id == llsdRequest.folder_id) == null)
114 folders.Add(llsdRequest);
113 } 115 }
114 116
115 if (folders.Count > 0) 117 if (folders.Count > 0)
@@ -540,6 +542,8 @@ namespace OpenSim.Capabilities.Handlers
540 List<LLSDFetchInventoryDescendents> libfolders = fetchFolders.FindAll(f => f.owner_id == m_LibraryService.LibraryRootFolder.Owner); 542 List<LLSDFetchInventoryDescendents> libfolders = fetchFolders.FindAll(f => f.owner_id == m_LibraryService.LibraryRootFolder.Owner);
541 fetchFolders.RemoveAll(f => libfolders.Contains(f)); 543 fetchFolders.RemoveAll(f => libfolders.Contains(f));
542 544
545 //m_log.DebugFormat("[XXX]: Found {0} library folders in request", libfolders.Count);
546
543 foreach (LLSDFetchInventoryDescendents f in libfolders) 547 foreach (LLSDFetchInventoryDescendents f in libfolders)
544 { 548 {
545 if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(f.folder_id)) != null) 549 if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(f.folder_id)) != null)
@@ -553,7 +557,7 @@ namespace OpenSim.Capabilities.Handlers
553 ret.Collection.Version = fold.Version; 557 ret.Collection.Version = fold.Version;
554 558
555 ret.Descendents = ret.Collection.Items.Count; 559 ret.Descendents = ret.Collection.Items.Count;
556 560// m_log.DebugFormat("[XXX]: Added libfolder {0} ({1})", ret.Collection.FolderID, ret.Collection.OwnerID);
557 result.Add(ret); 561 result.Add(ret);
558 } 562 }
559 } 563 }
@@ -578,6 +582,8 @@ namespace OpenSim.Capabilities.Handlers
578 foreach (LLSDFetchInventoryDescendents f in fetchFolders) 582 foreach (LLSDFetchInventoryDescendents f in fetchFolders)
579 fids[i++] = f.folder_id; 583 fids[i++] = f.folder_id;
580 584
585 //m_log.DebugFormat("[XXX]: {0}", string.Join(",", fids));
586
581 InventoryCollection[] fetchedContents = m_InventoryService.GetMultipleFoldersContent(fetchFolders[0].owner_id, fids); 587 InventoryCollection[] fetchedContents = m_InventoryService.GetMultipleFoldersContent(fetchFolders[0].owner_id, fids);
582 588
583 if (fetchedContents == null || (fetchedContents != null && fetchedContents.Length == 0)) 589 if (fetchedContents == null || (fetchedContents != null && fetchedContents.Length == 0))