From 0ea69770139f4369b202362be054047a5086a220 Mon Sep 17 00:00:00 2001 From: Freaky Tech Date: Thu, 5 Mar 2015 20:55:52 +0100 Subject: solving HG IM, HGFriends issues based on falsified GridUser data it does not consider GridUser as a viable source for residents' data. it does not consider Friends, Inventory Creators to be trusted at all. There are lots of broken entries in existence. There are lots of broken creator data fields in assets. The following issues arise from the broken data in the old User Management Module: failing HG IM failing HGFriends Requests Signed-off-by: BlueWall --- .../GridUser/ActivityDetector.cs | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index e05d186..2238c90 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs @@ -67,10 +67,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser { if (sp.PresenceType != PresenceType.Npc) { - string userid = sp.Scene.UserManagementModule.GetUserUUI(sp.UUID); + string userid; //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName); - m_GridUserService.SetLastPosition( - userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); + if (sp.Scene.UserManagementModule.GetUserUUI(sp.UUID, out userid)) + { + /* we only setposition on known agents that have a valid lookup */ + m_GridUserService.SetLastPosition( + userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); + } } } @@ -89,17 +93,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser if (client.SceneAgent.IsChildAgent) return; - string userId = client.AgentId.ToString(); + string userId; + /* without scene we cannot logout correctly at all since we do not know how to send the loggedout message then */ if (client.Scene is Scene) { Scene s = (Scene)client.Scene; userId = s.UserManagementModule.GetUserUUI(client.AgentId); + if(s.UserManagementModule.GetUserUUI(client.AgentId, out userId)) + { + m_GridUserService.LoggedOut( + userId, client.SessionId, client.Scene.RegionInfo.RegionID, + client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); + } } - //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", userId, client.Scene.RegionInfo.RegionName); - m_GridUserService.LoggedOut( - userId, client.SessionId, client.Scene.RegionInfo.RegionID, - client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); } } } -- cgit v1.1