From 765553d0984eff1a22243ced4a14c4bc98c6e2b7 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 17 Apr 2009 15:51:58 +0000 Subject: * Run RemoteAdminPlugin user info queries through cache service rather than direct --- .../RemoteController/RemoteAdminPlugin.cs | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'OpenSim/ApplicationPlugins') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 1a6deca..a7290b9 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -38,6 +38,7 @@ using Nwc.XmlRpc; using OpenMetaverse; using OpenSim; using OpenSim.Framework; +using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Region.CoreModules.World.Terrain; @@ -555,8 +556,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController else { // no client supplied UUID: look it up... - UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(masterFirst, masterLast); - if (null == userProfile) + CachedUserInfo userInfo + = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails( + masterFirst, masterLast); + + if (null == userInfo) { m_log.InfoFormat("master avatar does not exist, creating it"); // ...or create new user @@ -569,7 +573,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController } else { - userID = userProfile.ID; + userID = userInfo.UserProfile.ID; } } @@ -627,6 +631,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController response.Value = responseData; } + m_log.Info("[RADMIN]: CreateRegion: request complete"); return response; } @@ -772,10 +777,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("user_email")) email = (string)requestData["user_email"]; - UserProfileData userProfile = - m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); - if (null != userProfile) - throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); + CachedUserInfo userInfo = + m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); + + if (null != userInfo) + throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname)); UUID userID = m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname, @@ -854,12 +860,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController string firstname = (string) requestData["user_firstname"]; string lastname = (string) requestData["user_lastname"]; - UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); + CachedUserInfo userInfo + = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); responseData["user_firstname"] = firstname; responseData["user_lastname"] = lastname; - if (null == userProfile) + if (null == userInfo) responseData["success"] = false; else responseData["success"] = true; @@ -980,7 +987,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.ContainsKey("about_virtual_world")) aboutAvatar = (string)requestData["about_virtual_world"]; - UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); + UserProfileData userProfile + = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); if (null == userProfile) throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname)); -- cgit v1.1