* Run RemoteAdminPlugin user info queries through cache service rather than direct
parent
a189da844a
commit
765553d098
|
@ -38,6 +38,7 @@ using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim;
|
using OpenSim;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.CoreModules.World.Terrain;
|
using OpenSim.Region.CoreModules.World.Terrain;
|
||||||
|
@ -555,8 +556,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no client supplied UUID: look it up...
|
// no client supplied UUID: look it up...
|
||||||
UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(masterFirst, masterLast);
|
CachedUserInfo userInfo
|
||||||
if (null == userProfile)
|
= m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(
|
||||||
|
masterFirst, masterLast);
|
||||||
|
|
||||||
|
if (null == userInfo)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("master avatar does not exist, creating it");
|
m_log.InfoFormat("master avatar does not exist, creating it");
|
||||||
// ...or create new user
|
// ...or create new user
|
||||||
|
@ -569,7 +573,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
userID = userProfile.ID;
|
userID = userInfo.UserProfile.ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,6 +631,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Info("[RADMIN]: CreateRegion: request complete");
|
m_log.Info("[RADMIN]: CreateRegion: request complete");
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
@ -772,10 +777,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
if (requestData.Contains("user_email"))
|
if (requestData.Contains("user_email"))
|
||||||
email = (string)requestData["user_email"];
|
email = (string)requestData["user_email"];
|
||||||
|
|
||||||
UserProfileData userProfile =
|
CachedUserInfo userInfo =
|
||||||
m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname);
|
m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
|
||||||
if (null != userProfile)
|
|
||||||
throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname));
|
if (null != userInfo)
|
||||||
|
throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname));
|
||||||
|
|
||||||
UUID userID =
|
UUID userID =
|
||||||
m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname,
|
m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname,
|
||||||
|
@ -854,12 +860,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
string firstname = (string) requestData["user_firstname"];
|
string firstname = (string) requestData["user_firstname"];
|
||||||
string lastname = (string) requestData["user_lastname"];
|
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_firstname"] = firstname;
|
||||||
responseData["user_lastname"] = lastname;
|
responseData["user_lastname"] = lastname;
|
||||||
|
|
||||||
if (null == userProfile)
|
if (null == userInfo)
|
||||||
responseData["success"] = false;
|
responseData["success"] = false;
|
||||||
else
|
else
|
||||||
responseData["success"] = true;
|
responseData["success"] = true;
|
||||||
|
@ -980,7 +987,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
if (requestData.ContainsKey("about_virtual_world"))
|
if (requestData.ContainsKey("about_virtual_world"))
|
||||||
aboutAvatar = (string)requestData["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)
|
if (null == userProfile)
|
||||||
throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname));
|
throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname));
|
||||||
|
|
Loading…
Reference in New Issue