protected virtual void HandleUUIDNameRequest(UUID uuid, IClientAPI client) { // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", // uuid, remote_client.Name); if (m_Scenes.Count <= 0) { return; } if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) { client.SendNameReply(uuid, "Mr", "OpenSim"); } else { UserData user; /* bypass that continuation here when entry is already available */ lock (m_UserCache) { if (m_UserCache.TryGetValue(uuid, out user)) { if (!user.IsUnknownUser && user.HasGridUserTried) { client.SendNameReply(uuid, user.FirstName, user.LastName); return; } } } // 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, out user)) { if (client.IsActive) { client.SendNameReply(uuid, user.FirstName, user.LastName); } } // else // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}", // uuid, client.Name); }); } }
protected virtual void HandleUUIDNameRequest(UUID uuid, IClientAPI client) { // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", // uuid, remote_client.Name); if (m_Scenes.Count <= 0) { return; } if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) { client.SendNameReply(uuid, "Mr", "OpenSim"); } else { UserData user; /* bypass that continuation here when entry is already available */ lock (m_UserCache) { if (m_UserCache.TryGetValue(uuid, out user)) { if (!user.IsUnknownUser && user.HasGridUserTried) { client.SendNameReply(uuid, user.FirstName, user.LastName); return; } } } } if (m_ServiceThrottle == null) { return; } IClientAPI deferedcli = client; // Not found in cache, queue continuation m_ServiceThrottle.Enqueue("uuidname", uuid.ToString(), delegate { if (deferedcli.IsActive) { if (GetUser(uuid, deferedcli.ScopeId, out UserData defuser)) { if (deferedcli.IsActive) { deferedcli.SendNameReply(uuid, defuser.FirstName, defuser.LastName); } } } deferedcli = null; });
protected virtual void HandleUUIDNameRequest(UUID uuid, IClientAPI client) { // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", // uuid, remote_client.Name); if (m_Scenes.Count <= 0) { return; } if (m_userCacheByID.TryGetValue(uuid, out UserData user)) { if (user.HasGridUserTried) { client.SendNameReply(uuid, user.FirstName, user.LastName); return; } } if (m_ServiceThrottle == null) { return; } IClientAPI deferedcli = client; // Not found in cache, queue continuation m_ServiceThrottle.Enqueue("uuidname", uuid.ToString(), delegate { if (deferedcli.IsActive) { if (GetUser(uuid, deferedcli.ScopeId, out UserData defuser)) { if (deferedcli.IsActive) { deferedcli.SendNameReply(uuid, defuser.FirstName, defuser.LastName); } } } deferedcli = null; });
private void HandleUUIDNameRequest(UUID uuid, IClientAPI client) { // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", // uuid, remote_client.Name); if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) { client.SendNameReply(uuid, "Mr", "OpenSim"); } else { string[] names = new string[2]; if (TryGetUserNamesFromCache(uuid, names)) { client.SendNameReply(uuid, names[0], names[1]); return; } // Not found in cache, queue continuation m_ServiceThrottle.Enqueue("name", 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 (TryGetUserNames(uuid, names)) { client.SendNameReply(uuid, names[0], names[1]); } // else // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: No bound name for {0} found, ignoring request from {1}", // uuid, client.Name); }); } }
void HandleUUIDNameRequest(UUID uuid, IClientAPI client) { // m_log.DebugFormat( // "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", // uuid, remote_client.Name); if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) { client.SendNameReply(uuid, "Mr", "OpenSim"); } else { string[] names = new string[2]; if (TryGetUserNamesFromCache(uuid, names)) { client.SendNameReply(uuid, names[0], names[1]); return; } // Not found in cache, queue continuation m_ServiceThrottle.Enqueue("name", uuid.ToString(), delegate { //m_log.DebugFormat("[YYY]: Name request {0}", uuid); bool foundRealName = TryGetUserNames(uuid, names); if (names.Length == 2) { if (!foundRealName) { m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], uuid, client.Name); } client.SendNameReply(uuid, names[0], names[1]); } }); } }