From 9a7717743b7f7627bc80a69bb416838839062e72 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 11 Apr 2008 16:13:33 +0000 Subject: refactor: eliminate method in UserProfileCacheService --- .../Cache/UserProfileCacheService.cs | 27 +++++++++++----------- OpenSim/Region/Application/OpenSimMain.cs | 2 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index d94ff6c..873070a 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -77,16 +77,25 @@ namespace OpenSim.Framework.Communications.Cache } } } - } + } - public void UpdateUserInventory(LLUUID userID) + /// + /// Request the inventory data for the given user. This will occur asynchronous if running on a grid + /// + /// + /// + public void RequestInventoryForUser(LLUUID userID) { CachedUserInfo userInfo = GetUserDetails(userID); if (userInfo != null) + { + m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); + } + else { - RequestInventoryForUser(userID, userInfo); + m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID); } - } + } public CachedUserInfo GetUserDetails(LLUUID userID) { @@ -408,15 +417,5 @@ namespace OpenSim.Framework.Communications.Cache } } } - - /// - /// Request the inventory data for the given user. - /// - /// - /// - private void RequestInventoryForUser(LLUUID userID, CachedUserInfo userInfo) - { - m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); - } } } diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 91a0f19..1167576 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -59,7 +59,7 @@ namespace OpenSim public delegate void ConsoleCommand(string[] comParams); public class OpenSimMain : RegionApplicationBase, conscmd_callback - { + { private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private string proxyUrl; private int proxyOffset = 0; diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 365c884..795224e 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -550,7 +550,7 @@ namespace OpenSim.Region.Environment.Scenes m_physicsActor.Flying = isFlying; m_scene.SwapRootAgentCount(false); - m_scene.CommsManager.UserProfileCacheService.UpdateUserInventory(m_uuid); + m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); m_scene.AddCapsHandler(m_uuid); //if (!m_gotAllObjectsInScene) //{ -- cgit v1.1