aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-26 01:39:23 +0000
committerJustin Clark-Casey (justincc)2011-11-26 01:39:23 +0000
commitbafea2282a95017099578a0a31a908e746161414 (patch)
tree21a459dcbccb81291dfd953f2c48bd853b4e5b1a
parentUse the same web fetch handler for every request from every avatar, since it ... (diff)
downloadopensim-SC_OLD-bafea2282a95017099578a0a31a908e746161414.zip
opensim-SC_OLD-bafea2282a95017099578a0a31a908e746161414.tar.gz
opensim-SC_OLD-bafea2282a95017099578a0a31a908e746161414.tar.bz2
opensim-SC_OLD-bafea2282a95017099578a0a31a908e746161414.tar.xz
Rip out unused Scene.HandleFetchInventoryDescendentsCAPS().
This has been handled by WebFetchInvDescHandler.Fetch() for some time.
-rw-r--r--OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs13
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs58
3 files changed, 13 insertions, 59 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index de7abe2..2dade5b 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -184,6 +184,17 @@ namespace OpenSim.Capabilities.Handlers
184 return reply; 184 return reply;
185 } 185 }
186 186
187 /// <summary>
188 /// Handle the caps inventory descendents fetch.
189 /// </summary>
190 /// <param name="agentID"></param>
191 /// <param name="folderID"></param>
192 /// <param name="ownerID"></param>
193 /// <param name="fetchFolders"></param>
194 /// <param name="fetchItems"></param>
195 /// <param name="sortOrder"></param>
196 /// <param name="version"></param>
197 /// <returns>An empty InventoryCollection if the inventory look up failed</returns>
187 public InventoryCollection Fetch( 198 public InventoryCollection Fetch(
188 UUID agentID, UUID folderID, UUID ownerID, 199 UUID agentID, UUID folderID, UUID ownerID,
189 bool fetchFolders, bool fetchItems, int sortOrder, out int version) 200 bool fetchFolders, bool fetchItems, int sortOrder, out int version)
@@ -192,6 +203,8 @@ namespace OpenSim.Capabilities.Handlers
192// "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", 203// "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
193// fetchFolders, fetchItems, folderID, agentID); 204// fetchFolders, fetchItems, folderID, agentID);
194 205
206 // FIXME MAYBE: We're not handling sortOrder!
207
195 version = 0; 208 version = 0;
196 InventoryFolderImpl fold; 209 InventoryFolderImpl fold;
197 if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner) 210 if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner)
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index b93a41b..8f0ae76 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -134,7 +134,6 @@ namespace OpenSim.Region.ClientStack.Linden
134 AddNewInventoryItem = m_Scene.AddUploadedInventoryItem; 134 AddNewInventoryItem = m_Scene.AddUploadedInventoryItem;
135 ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset; 135 ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
136 TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset; 136 TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
137 CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
138 GetClient = m_Scene.SceneGraph.GetControllingClient; 137 GetClient = m_Scene.SceneGraph.GetControllingClient;
139 } 138 }
140 139
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 270e582..2ac6387 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -511,64 +511,6 @@ namespace OpenSim.Region.Framework.Scenes
511 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; 511 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
512 d.EndInvoke(iar); 512 d.EndInvoke(iar);
513 } 513 }
514
515 /// <summary>
516 /// Handle the caps inventory descendents fetch.
517 ///
518 /// Since the folder structure is sent to the client on login, I believe we only need to handle items.
519 /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime??
520 /// </summary>
521 /// <param name="agentID"></param>
522 /// <param name="folderID"></param>
523 /// <param name="ownerID"></param>
524 /// <param name="fetchFolders"></param>
525 /// <param name="fetchItems"></param>
526 /// <param name="sortOrder"></param>
527 /// <returns>null if the inventory look up failed</returns>
528 public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
529 bool fetchFolders, bool fetchItems, int sortOrder, out int version)
530 {
531 m_log.DebugFormat(
532 "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
533 fetchFolders, fetchItems, folderID, agentID);
534
535 // FIXME MAYBE: We're not handling sortOrder!
536
537 // TODO: This code for looking in the folder for the library should be folded back into the
538 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
539 // can be handled transparently).
540 InventoryFolderImpl fold;
541 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
542 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
543 {
544 version = 0;
545 InventoryCollection ret = new InventoryCollection();
546 ret.Folders = new List<InventoryFolderBase>();
547 ret.Items = fold.RequestListOfItems();
548
549 return ret;
550 }
551
552 InventoryCollection contents = new InventoryCollection();
553
554 if (folderID != UUID.Zero)
555 {
556 contents = InventoryService.GetFolderContent(agentID, folderID);
557 InventoryFolderBase containingFolder = new InventoryFolderBase();
558 containingFolder.ID = folderID;
559 containingFolder.Owner = agentID;
560 containingFolder = InventoryService.GetFolder(containingFolder);
561 version = containingFolder.Version;
562 }
563 else
564 {
565 // Lost itemsm don't really need a version
566 version = 1;
567 }
568
569 return contents;
570
571 }
572 514
573 /// <summary> 515 /// <summary>
574 /// Handle an inventory folder creation request from the client. 516 /// Handle an inventory folder creation request from the client.