avoid ethernal references

master
UbitUmarov 2020-07-23 19:04:56 +01:00
parent 25582af3dc
commit c2af3a5474
1 changed files with 14 additions and 21 deletions

View File

@ -207,31 +207,24 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
}
}
if(m_ServiceThrottle == null)
return;
IClientAPI deferedcli = client;
// Not found in cache, queue continuation
m_ServiceThrottle.Enqueue("uuidname", uuid.ToString(), delegate
{
//m_log.DebugFormat("[YYY]: Name request {0}", uuid);
// As least upto September 2013, clients permanently cache UUID -> Name bindings. Some clients
// appear to clear this when the user asks it to clear the cache, but others may not.
//
// So to avoid clients
// (particularly Hypergrid clients) permanently binding "Unknown User" to a given UUID, we will
// instead drop the request entirely.
if(!client.IsActive)
return;
if (GetUser(uuid, client.ScopeId, out user))
if(deferedcli.IsActive)
{
if(client.IsActive)
client.SendNameReply(uuid, user.FirstName, user.LastName);
if (GetUser(uuid, deferedcli.ScopeId, out UserData defuser))
{
if(deferedcli.IsActive)
deferedcli.SendNameReply(uuid, defuser.FirstName, defuser.LastName);
}
// else
// m_log.DebugFormat(
// "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}",
// uuid, client.Name);
}
deferedcli = null;
});
}
}
public virtual void HandleAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
{