diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 43a72e2..08863c2 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -325,34 +325,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
325 | 325 | ||
326 | void OnConnectionClosed(IClientAPI obj) | 326 | void OnConnectionClosed(IClientAPI obj) |
327 | { | 327 | { |
328 | if (obj.IsLoggingOut) | 328 | if (obj.SceneAgent.IsChildAgent) |
329 | { | 329 | return; |
330 | object sp = null; | ||
331 | if (obj.Scene.TryGetScenePresence(obj.AgentId, out sp)) | ||
332 | { | ||
333 | if (((ScenePresence)sp).IsChildAgent) | ||
334 | return; | ||
335 | } | ||
336 | 330 | ||
337 | // Let's find out if this is a foreign user or a local user | 331 | // Let's find out if this is a foreign user or a local user |
338 | IUserManagement uMan = Scene.RequestModuleInterface<IUserManagement>(); | 332 | IUserManagement uMan = Scene.RequestModuleInterface<IUserManagement>(); |
339 | // UserAccount account = Scene.UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, obj.AgentId); | 333 | // UserAccount account = Scene.UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, obj.AgentId); |
340 | if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) | ||
341 | { | ||
342 | // local grid user | ||
343 | return; | ||
344 | } | ||
345 | 334 | ||
346 | AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); | 335 | if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) |
336 | { | ||
337 | // local grid user | ||
338 | return; | ||
339 | } | ||
347 | 340 | ||
348 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) | 341 | AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); |
349 | { | 342 | |
350 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); | 343 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) |
351 | IUserAgentService security = new UserAgentServiceConnector(url); | 344 | { |
352 | security.LogoutAgent(obj.AgentId, obj.SessionId); | 345 | string url = aCircuit.ServiceURLs["HomeURI"].ToString(); |
353 | //m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url); | 346 | IUserAgentService security = new UserAgentServiceConnector(url); |
354 | } | 347 | security.LogoutAgent(obj.AgentId, obj.SessionId); |
355 | else | 348 | //m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Sent logout call to UserAgentService @ {0}", url); |
349 | } | ||
350 | else | ||
351 | { | ||
356 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId); | 352 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: HomeURI not found for agent {0} logout", obj.AgentId); |
357 | } | 353 | } |
358 | } | 354 | } |