aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-12 02:43:33 +0100
committerJustin Clark-Casey (justincc)2012-06-12 02:43:33 +0100
commit1b1f0a2d77fb4d2ac572f16c71a7560860c8c040 (patch)
tree2e18738453d51b8a551ba5f9ba7a0cada4cff62c /OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
parentSet IClientAPI.IsActive = false early on client removal due to ack timeout ra... (diff)
downloadopensim-SC_OLD-1b1f0a2d77fb4d2ac572f16c71a7560860c8c040.zip
opensim-SC_OLD-1b1f0a2d77fb4d2ac572f16c71a7560860c8c040.tar.gz
opensim-SC_OLD-1b1f0a2d77fb4d2ac572f16c71a7560860c8c040.tar.bz2
opensim-SC_OLD-1b1f0a2d77fb4d2ac572f16c71a7560860c8c040.tar.xz
OnConnectionClosed listeners, retrieve data from IClientAPI.SceneAgent rather than scanning all scene for the presence with the right id
Stop checking IsLoggingOut on these listeners, if called with a root agent then we always want to perform these actions. This covers cases where the client is closed due to manual kick, simulator shutdown, etc.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs28
1 files changed, 6 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
index 4cf62ec..b0edce7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
@@ -79,29 +79,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
79 79
80 public void OnConnectionClose(IClientAPI client) 80 public void OnConnectionClose(IClientAPI client)
81 { 81 {
82 if (client.IsLoggingOut) 82 if (client.SceneAgent.IsChildAgent)
83 { 83 return;
84 object sp = null;
85 Vector3 position = new Vector3(128, 128, 0);
86 Vector3 lookat = new Vector3(0, 1, 0);
87
88 if (client.Scene.TryGetScenePresence(client.AgentId, out sp))
89 {
90 if (sp is ScenePresence)
91 {
92 if (((ScenePresence)sp).IsChildAgent)
93 return;
94
95 position = ((ScenePresence)sp).AbsolutePosition;
96 lookat = ((ScenePresence)sp).Lookat;
97 }
98 }
99
100// m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
101 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat);
102 }
103 84
85// m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
86 m_GridUserService.LoggedOut(
87 client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID,
88 client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat);
104 } 89 }
105
106 } 90 }
107} 91}