diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 28 insertions, 59 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 7e71fd1..3010b59 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -328,34 +328,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
328 | 328 | ||
329 | void OnConnectionClosed(IClientAPI obj) | 329 | void OnConnectionClosed(IClientAPI obj) |
330 | { | 330 | { |
331 | if (obj.IsLoggingOut) | 331 | if (obj.SceneAgent.IsChildAgent) |
332 | { | 332 | return; |
333 | object sp = null; | ||
334 | if (obj.Scene.TryGetScenePresence(obj.AgentId, out sp)) | ||
335 | { | ||
336 | if (((ScenePresence)sp).IsChildAgent) | ||
337 | return; | ||
338 | } | ||
339 | 333 | ||
340 | // Let's find out if this is a foreign user or a local user | 334 | // Let's find out if this is a foreign user or a local user |
341 | IUserManagement uMan = Scene.RequestModuleInterface<IUserManagement>(); | 335 | IUserManagement uMan = Scene.RequestModuleInterface<IUserManagement>(); |
342 | // UserAccount account = Scene.UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, obj.AgentId); | 336 | // UserAccount account = Scene.UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, obj.AgentId); |
343 | if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) | ||
344 | { | ||
345 | // local grid user | ||
346 | return; | ||
347 | } | ||
348 | 337 | ||
349 | AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); | 338 | if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) |
339 | { | ||
340 | // local grid user | ||
341 | return; | ||
342 | } | ||
350 | 343 | ||
351 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) | 344 | AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); |
352 | { | 345 | |
353 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); | 346 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) |
354 | IUserAgentService security = new UserAgentServiceConnector(url); | 347 | { |
355 | security.LogoutAgent(obj.AgentId, obj.SessionId); | 348 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); |
356 | //m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url); | 349 | IUserAgentService security = new UserAgentServiceConnector(url); |
357 | } | 350 | security.LogoutAgent(obj.AgentId, obj.SessionId); |
358 | else | 351 | //m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url); |
352 | } | ||
353 | else | ||
354 | { | ||
359 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId); | 355 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId); |
360 | } | 356 | } |
361 | } | 357 | } |
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 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index ccfbf78..172bea1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -64,7 +64,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
64 | scene.EventManager.OnNewClient -= OnNewClient; | 64 | scene.EventManager.OnNewClient -= OnNewClient; |
65 | 65 | ||
66 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); | 66 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); |
67 | |||
68 | } | 67 | } |
69 | 68 | ||
70 | public void OnMakeRootAgent(ScenePresence sp) | 69 | public void OnMakeRootAgent(ScenePresence sp) |
@@ -80,18 +79,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
80 | 79 | ||
81 | public void OnConnectionClose(IClientAPI client) | 80 | public void OnConnectionClose(IClientAPI client) |
82 | { | 81 | { |
83 | if (client.IsLoggingOut) | 82 | if (!client.SceneAgent.IsChildAgent) |
84 | { | 83 | { |
85 | object sp = null; | ||
86 | if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) | ||
87 | { | ||
88 | if (sp is ScenePresence) | ||
89 | { | ||
90 | if (((ScenePresence)sp).IsChildAgent) | ||
91 | return; | ||
92 | } | ||
93 | } | ||
94 | |||
95 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 84 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
96 | m_PresenceService.LogoutAgent(client.SessionId); | 85 | m_PresenceService.LogoutAgent(client.SessionId); |
97 | } | 86 | } |