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