From 2fddd775f48d9261772f804f0396bb24768afae7 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sun, 30 Mar 2008 00:45:04 +0000
Subject: * Stop the grid inventory service sending all folder and item details
twice * This change will have no functional impact - we were already
filtering out the dupes on the other end.
---
.../Communications/InventoryServiceBase.cs | 33 +---------------------
.../Grid/InventoryServer/GridInventoryService.cs | 32 ++++++---------------
2 files changed, 10 insertions(+), 55 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index 719e0d6..a0228e8 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -75,42 +75,11 @@ namespace OpenSim.Framework.Communications
#endregion
#region IInventoryServices methods
-
- ///
- /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
- /// for the given user.
- ///
- ///
- ///
- public List RequestFirstLevelFolders(LLUUID userID)
- {
- List inventoryList = new List();
- InventoryFolderBase rootFolder = null;
-
- foreach (KeyValuePair plugin in m_plugins)
- {
- rootFolder = plugin.Value.getUserRootFolder(userID);
- if (rootFolder != null)
- {
- m_log.Info(
- "[INVENTORY]: Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
-
- inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
- inventoryList.Insert(0, rootFolder);
- return inventoryList;
- }
- }
-
- m_log.Warn(
- "[INVENTORY]: Could not find a root folder belonging to user with ID " + userID);
-
- return inventoryList;
- }
// See IInventoryServices
public List GetInventorySkeleton(LLUUID userId)
{
- m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
+ //m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
List userFolders = new List();
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index a003cd3..681e8bb 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -46,22 +46,8 @@ namespace OpenSim.Grid.InventoryServer
private bool TryGetUsersInventory(LLUUID userID, out List folderList,
out List itemsList)
{
- List rootFolders = RequestFirstLevelFolders(userID);
+ List allFolders = GetInventorySkeleton(userID);
List allItems = new List();
- List allFolders = new List();
-
- if (rootFolders != null)
- {
- allFolders.InsertRange(0, rootFolders);
- foreach (InventoryFolderBase subfolder in rootFolders)
- {
- List subFolders = GetAllFolders(subfolder.folderID);
- if (subFolders != null)
- {
- allFolders.InsertRange(0, subFolders);
- }
- }
- }
foreach (InventoryFolderBase folder in allFolders)
{
@@ -108,7 +94,7 @@ namespace OpenSim.Grid.InventoryServer
{
LLUUID userID = new LLUUID(rawUserID);
- m_log.Info("[GRID INVENTORY]: Request for inventory of " + userID.ToString());
+ m_log.Info("[AGENT INVENTORY]: Processing request for inventory of " + userID.ToString());
InventoryCollection invCollection = new InventoryCollection();
List folders;
@@ -123,14 +109,14 @@ namespace OpenSim.Grid.InventoryServer
// foreach (InventoryFolderBase folder in folders)
// {
// m_log.DebugFormat(
-// "[GRID INVENTORY]: Sending back folder {0}, {1}",
+// "[AGENT INVENTORY]: Sending back folder {0}, {1}",
// folder.name, folder.folderID);
// }
//
// foreach (InventoryItemBase item in allItems)
// {
// m_log.DebugFormat(
-// "[GRID INVENTORY]: Sending back item {0}, {1}, folder {2}",
+// "[AGENT INVENTORY]: Sending back item {0}, {1}, folder {2}",
// item.inventoryName, item.inventoryID, item.parentFolderID);
// }
@@ -153,7 +139,7 @@ namespace OpenSim.Grid.InventoryServer
LLUUID userID = new LLUUID(rawUserID);
m_log.Info(
- "[INVENTORY]: Creating new set of inventory folders for " + userID.ToString());
+ "[AGENT INVENTORY]: Creating new set of inventory folders for " + userID.ToString());
CreateNewUserInventory(userID);
return true;
@@ -179,7 +165,7 @@ namespace OpenSim.Grid.InventoryServer
{
// Right now, this actions act more like an update/insert combination than a simple create.
m_log.Info(
- "[INVENTORY]: " +
+ "[AGENT INVENTORY]: " +
"Updating in " + folder.parentID.ToString()
+ ", folder " + folder.name);
@@ -190,7 +176,7 @@ namespace OpenSim.Grid.InventoryServer
public bool MoveInventoryFolder(InventoryFolderBase folder)
{
m_log.Info(
- "[INVENTORY]: " +
+ "[AGENT INVENTORY]: " +
"Moving folder " + folder.folderID
+ " to " + folder.parentID.ToString());
@@ -202,7 +188,7 @@ namespace OpenSim.Grid.InventoryServer
{
// Right now, this actions act more like an update/insert combination than a simple create.
m_log.Info(
- "[INVENTORY]: " +
+ "[AGENT INVENTORY]: " +
"Updating in " + item.parentFolderID.ToString()
+ ", item " + item.inventoryName);
@@ -214,7 +200,7 @@ namespace OpenSim.Grid.InventoryServer
{
// extra spaces to align with other inventory messages
m_log.Info(
- "[INVENTORY]: " +
+ "[AGENT INVENTORY]: " +
"Deleting in " + item.parentFolderID.ToString()
+ ", item " + item.inventoryName);
--
cgit v1.1