mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
Merge branch 'master' into htb-throttle
This is hand-edited to not let master changes creep into here and may cause a somewhat rocky merge to master later.
This commit is contained in:
@@ -209,35 +209,24 @@ namespace OpenSim.Framework.Communications
|
||||
|
||||
private string[] doUUIDNameRequest(UUID uuid)
|
||||
{
|
||||
string[] returnstring = new string[0];
|
||||
bool doLookup = false;
|
||||
|
||||
lock (m_nameRequestCache)
|
||||
{
|
||||
if (m_nameRequestCache.ContainsKey(uuid))
|
||||
{
|
||||
returnstring = m_nameRequestCache[uuid];
|
||||
}
|
||||
else
|
||||
{
|
||||
// we don't want to lock the dictionary while we're doing the lookup
|
||||
doLookup = true;
|
||||
}
|
||||
return m_nameRequestCache[uuid];
|
||||
}
|
||||
|
||||
if (doLookup) {
|
||||
UserProfileData profileData = m_userService.GetUserProfile(uuid);
|
||||
if (profileData != null)
|
||||
string[] returnstring = new string[0];
|
||||
CachedUserInfo uinfo = UserProfileCacheService.GetUserDetails(uuid);
|
||||
|
||||
if ((uinfo != null) && (uinfo.UserProfile != null))
|
||||
{
|
||||
returnstring = new string[2];
|
||||
returnstring[0] = uinfo.UserProfile.FirstName;
|
||||
returnstring[1] = uinfo.UserProfile.SurName;
|
||||
lock (m_nameRequestCache)
|
||||
{
|
||||
returnstring = new string[2];
|
||||
// UUID profileId = profileData.ID;
|
||||
returnstring[0] = profileData.FirstName;
|
||||
returnstring[1] = profileData.SurName;
|
||||
lock (m_nameRequestCache)
|
||||
{
|
||||
if (!m_nameRequestCache.ContainsKey(uuid))
|
||||
m_nameRequestCache.Add(uuid, returnstring);
|
||||
}
|
||||
if (!m_nameRequestCache.ContainsKey(uuid))
|
||||
m_nameRequestCache.Add(uuid, returnstring);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user