diff options
Diffstat (limited to 'OpenSim')
6 files changed, 43 insertions, 70 deletions
diff --git a/OpenSim/Framework/ISceneAgent.cs b/OpenSim/Framework/ISceneAgent.cs index 824172d..563d906 100644 --- a/OpenSim/Framework/ISceneAgent.cs +++ b/OpenSim/Framework/ISceneAgent.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | ||
29 | 30 | ||
30 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
31 | { | 32 | { |
@@ -71,5 +72,11 @@ namespace OpenSim.Framework | |||
71 | /// This includes scene object data and the appearance data of other avatars. | 72 | /// This includes scene object data and the appearance data of other avatars. |
72 | /// </remarks> | 73 | /// </remarks> |
73 | void SendInitialDataToMe(); | 74 | void SendInitialDataToMe(); |
75 | |||
76 | /// <summary> | ||
77 | /// Direction in which the scene presence is looking. | ||
78 | /// </summary> | ||
79 | /// <remarks>Will be Vector3.Zero for a child agent.</remarks> | ||
80 | Vector3 Lookat { get; } | ||
74 | } | 81 | } |
75 | } \ No newline at end of file | 82 | } \ No newline at end of file |
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 | } |
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 b43745c..172bea1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
79 | 79 | ||
80 | public void OnConnectionClose(IClientAPI client) | 80 | public void OnConnectionClose(IClientAPI client) |
81 | { | 81 | { |
82 | if (client.IsLoggingOut && !client.SceneAgent.IsChildAgent) | 82 | if (!client.SceneAgent.IsChildAgent) |
83 | { | 83 | { |
84 | // 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); |
85 | m_PresenceService.LogoutAgent(client.SessionId); | 85 | m_PresenceService.LogoutAgent(client.SessionId); |
diff --git a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs index 9cb5674..d9d2e64 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs | |||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | if (fh.Client.IsLoggingOut) | 140 | if (!fh.Client.IsActive) |
141 | continue; | 141 | continue; |
142 | 142 | ||
143 | // m_log.DebugFormat( | 143 | // m_log.DebugFormat( |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs index 2267325..95e4bab 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs | |||
@@ -79,27 +79,13 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
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 | 84 | ||
100 | // m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 85 | // 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); | 86 | m_GridUserService.LoggedOut( |
102 | } | 87 | client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, |
88 | client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); | ||
103 | } | 89 | } |
104 | 90 | ||
105 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) | 91 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) |
@@ -111,4 +97,4 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
111 | }); | 97 | }); |
112 | } | 98 | } |
113 | } | 99 | } |
114 | } | 100 | } \ No newline at end of file |