From a81edef2b9b32c6697a46f504af679185aab3ceb Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 1 May 2008 21:22:03 +0000 Subject: * Refactor: Remove redundant userID from further up the inventory request chain --- .../Communications/OGS1/OGS1InventoryService.cs | 25 +++++----------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs') diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index ba91f14..f7037ea 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -44,7 +44,8 @@ namespace OpenSim.Region.Communications.OGS1 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string _inventoryServerUrl; - private Dictionary m_RequestingInventory = new Dictionary(); + private Dictionary m_RequestingInventory + = new Dictionary(); public OGS1InventoryService(string inventoryServerUrl) { @@ -62,8 +63,7 @@ namespace OpenSim.Region.Communications.OGS1 { if (!m_RequestingInventory.ContainsKey(userID)) { - InventoryRequest request = new InventoryRequest(userID, callback); - m_RequestingInventory.Add(userID, request); + m_RequestingInventory.Add(userID, callback); try { @@ -103,7 +103,7 @@ namespace OpenSim.Region.Communications.OGS1 userID, response.Folders.Count, response.Items.Count); InventoryFolderImpl rootFolder = null; - InventoryRequest request = m_RequestingInventory[userID]; + InventoryReceiptCallback callback = m_RequestingInventory[userID]; ICollection folders = new List(); ICollection items = new List(); @@ -139,7 +139,7 @@ namespace OpenSim.Region.Communications.OGS1 m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Did not get back an inventory containing a root folder for user {0}", userID); } - request.Callback(userID, folders, items); + callback(folders, items); m_RequestingInventory.Remove(userID); } @@ -289,20 +289,5 @@ namespace OpenSim.Region.Communications.OGS1 } #endregion - - /// - /// Caches a pending inventory request that has yet to be satisfied by the inventory service - /// - public class InventoryRequest - { - public LLUUID UserID; - public InventoryReceiptCallback Callback; - - public InventoryRequest(LLUUID userId, InventoryReceiptCallback callback) - { - UserID = userId; - Callback = callback; - } - } } } -- cgit v1.1