From 10875427058e68784ca6f5538a00a0cafd46a72b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sat, 3 May 2008 18:57:02 +0000
Subject: * Refactor: Move bulk of CreateFolder from UserProfileCacheService
into CachedUserInfo * Remove unused/superseded methods from
GridInventoryService
---
.../Grid/InventoryServer/GridInventoryService.cs | 66 +++-------------------
1 file changed, 8 insertions(+), 58 deletions(-)
(limited to 'OpenSim/Grid/InventoryServer')
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index d9510e9..f0eef31 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -28,8 +28,11 @@
using System;
using System.Collections.Generic;
using System.Reflection;
+using System.Threading;
+
using libsecondlife;
using log4net;
+
using OpenSim.Framework;
using OpenSim.Framework.Communications;
@@ -48,71 +51,18 @@ namespace OpenSim.Grid.InventoryServer
}
///
- /// Get a user's inventory.
- ///
- ///
- ///
- ///
- /// true if the inventory was retrieved, false otherwise
- private bool GetUsersInventory(LLUUID userID, out List folderList,
- out List itemsList)
- {
- List allFolders = GetInventorySkeleton(userID);
- List allItems = new List();
-
- foreach (InventoryFolderBase folder in allFolders)
- {
- List items = RequestFolderItems(folder.ID);
- if (items != null)
- {
- allItems.InsertRange(0, items);
- }
- }
-
- folderList = allFolders;
- itemsList = allItems;
- if (folderList != null)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- private List GetAllFolders(LLUUID folder)
- {
- List allFolders = new List();
- List folders = RequestSubFolders(folder);
- if (folders != null)
- {
- allFolders.InsertRange(0, folders);
- foreach (InventoryFolderBase subfolder in folders)
- {
- List subFolders = GetAllFolders(subfolder.ID);
- if (subFolders != null)
- {
- allFolders.InsertRange(0, subFolders);
- }
- }
- }
- return allFolders;
- }
-
- ///
/// Return a user's entire inventory
///
///
/// The user's inventory. If an inventory cannot be found then an empty collection is returned.
public InventoryCollection GetUserInventory(Guid rawUserID)
- {
- // uncomment me to simulate an overloaded inventory server
- //Thread.Sleep(20000);
-
+ {
LLUUID userID = new LLUUID(rawUserID);
- m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID);
+ m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID);
+
+ // uncomment me to simulate an overloaded inventory server
+ //Thread.Sleep(20000);
InventoryCollection invCollection = new InventoryCollection();
--
cgit v1.1