diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index 221f815..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 | |||
67 | { | 67 | { |
68 | if (sp.PresenceType != PresenceType.Npc) | 68 | if (sp.PresenceType != PresenceType.Npc) |
69 | { | 69 | { |
70 | string userid = sp.Scene.UserManagementModule.GetUserUUI(sp.UUID); | 70 | string userid; |
71 | //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName); | 71 | //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName); |
72 | m_GridUserService.SetLastPosition( | 72 | if (sp.Scene.UserManagementModule.GetUserUUI(sp.UUID, out userid)) |
73 | userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 73 | { |
74 | /* we only setposition on known agents that have a valid lookup */ | ||
75 | m_GridUserService.SetLastPosition( | ||
76 | userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
77 | } | ||
74 | } | 78 | } |
75 | } | 79 | } |
76 | 80 | ||
@@ -81,20 +85,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
81 | 85 | ||
82 | public void OnConnectionClose(IClientAPI client) | 86 | public void OnConnectionClose(IClientAPI client) |
83 | { | 87 | { |
88 | if (client == null) | ||
89 | return; | ||
90 | if (client.SceneAgent == null) | ||
91 | return; | ||
92 | |||
84 | if (client.SceneAgent.IsChildAgent) | 93 | if (client.SceneAgent.IsChildAgent) |
85 | return; | 94 | return; |
86 | 95 | ||
87 | string userId = client.AgentId.ToString(); | 96 | string userId; |
97 | /* without scene we cannot logout correctly at all since we do not know how to send the loggedout message then */ | ||
88 | if (client.Scene is Scene) | 98 | if (client.Scene is Scene) |
89 | { | 99 | { |
90 | Scene s = (Scene)client.Scene; | 100 | Scene s = (Scene)client.Scene; |
91 | userId = s.UserManagementModule.GetUserUUI(client.AgentId); | 101 | userId = s.UserManagementModule.GetUserUUI(client.AgentId); |
102 | if(s.UserManagementModule.GetUserUUI(client.AgentId, out userId)) | ||
103 | { | ||
104 | m_GridUserService.LoggedOut( | ||
105 | userId, client.SessionId, client.Scene.RegionInfo.RegionID, | ||
106 | client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); | ||
107 | } | ||
92 | } | 108 | } |
93 | //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", userId, client.Scene.RegionInfo.RegionName); | ||
94 | 109 | ||
95 | m_GridUserService.LoggedOut( | ||
96 | userId, client.SessionId, client.Scene.RegionInfo.RegionID, | ||
97 | client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); | ||
98 | } | 110 | } |
99 | } | 111 | } |
100 | } | 112 | } |