diff options
Diffstat (limited to 'OpenSim')
10 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index 116a1dc..f523c73 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
104 | } | 104 | } |
105 | } | 105 | } |
106 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 106 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
107 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); | 107 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat); |
108 | } | 108 | } |
109 | 109 | ||
110 | } | 110 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs index 76e030f..985acec 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs | |||
@@ -152,9 +152,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
152 | return m_GridUserService.LoggedIn(userID); | 152 | return m_GridUserService.LoggedIn(userID); |
153 | } | 153 | } |
154 | 154 | ||
155 | public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 155 | public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
156 | { | 156 | { |
157 | return m_GridUserService.LoggedOut(userID, regionID, lastPosition, lastLookAt); | 157 | return m_GridUserService.LoggedOut(userID, sessionID, regionID, lastPosition, lastLookAt); |
158 | } | 158 | } |
159 | 159 | ||
160 | public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt) | 160 | public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs index fb11e9a..95b3591 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs | |||
@@ -126,9 +126,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
126 | return null; | 126 | return null; |
127 | } | 127 | } |
128 | 128 | ||
129 | public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat) | 129 | public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) |
130 | { | 130 | { |
131 | return m_RemoteConnector.LoggedOut(userID, region, position, lookat); | 131 | return m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat); |
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index 6b14a52..485bc3e 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | |||
@@ -131,7 +131,7 @@ namespace OpenSim.Server.Handlers.GridUser | |||
131 | if (!UnpackArgs(request, out userID, out regionID, out position, out lookat)) | 131 | if (!UnpackArgs(request, out userID, out regionID, out position, out lookat)) |
132 | return FailureResult(); | 132 | return FailureResult(); |
133 | 133 | ||
134 | if (m_GridUserService.LoggedOut(userID, regionID, position, lookat)) | 134 | if (m_GridUserService.LoggedOut(userID, UUID.Zero, regionID, position, lookat)) |
135 | return SuccessResult(); | 135 | return SuccessResult(); |
136 | 136 | ||
137 | return FailureResult(); | 137 | return FailureResult(); |
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs index 48d2939..b3ea865 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Services.Connectors | |||
101 | 101 | ||
102 | } | 102 | } |
103 | 103 | ||
104 | public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat) | 104 | public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) |
105 | { | 105 | { |
106 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 106 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
107 | //sendData["SCOPEID"] = scopeID.ToString(); | 107 | //sendData["SCOPEID"] = scopeID.ToString(); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs index c89c81a..b8703c6 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs | |||
@@ -40,7 +40,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 41 | ||
42 | private IGridUserService m_GridUserService; | 42 | private IGridUserService m_GridUserService; |
43 | private Scene m_aScene; | ||
44 | 43 | ||
45 | public SimianActivityDetector(IGridUserService guService) | 44 | public SimianActivityDetector(IGridUserService guService) |
46 | { | 45 | { |
@@ -55,9 +54,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
55 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | 54 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; |
56 | scene.EventManager.OnNewClient += OnNewClient; | 55 | scene.EventManager.OnNewClient += OnNewClient; |
57 | scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel; | 56 | scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel; |
58 | |||
59 | if (m_aScene == null) | ||
60 | m_aScene = scene; | ||
61 | } | 57 | } |
62 | 58 | ||
63 | public void RemoveRegion(Scene scene) | 59 | public void RemoveRegion(Scene scene) |
@@ -102,7 +98,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
102 | } | 98 | } |
103 | 99 | ||
104 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 100 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
105 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); | 101 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat); |
106 | } | 102 | } |
107 | } | 103 | } |
108 | 104 | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index fa51c9a..a41c6ad 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -260,7 +260,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
260 | return null; | 260 | return null; |
261 | } | 261 | } |
262 | 262 | ||
263 | public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 263 | public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
264 | { | 264 | { |
265 | // Save our last position as user data | 265 | // Save our last position as user data |
266 | NameValueCollection requestArgs = new NameValueCollection | 266 | NameValueCollection requestArgs = new NameValueCollection |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 8c3be70..8acd618 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -232,7 +232,7 @@ namespace OpenSim.Services.HypergridService | |||
232 | 232 | ||
233 | GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString()); | 233 | GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString()); |
234 | if (guinfo != null) | 234 | if (guinfo != null) |
235 | m_GridUserService.LoggedOut(userID.ToString(), guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt); | 235 | m_GridUserService.LoggedOut(userID.ToString(), sessionID, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt); |
236 | } | 236 | } |
237 | 237 | ||
238 | // We need to prevent foreign users with the same UUID as a local user | 238 | // We need to prevent foreign users with the same UUID as a local user |
diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs index dfb79a4..6613ae7 100644 --- a/OpenSim/Services/Interfaces/IGridUserService.cs +++ b/OpenSim/Services/Interfaces/IGridUserService.cs | |||
@@ -105,7 +105,17 @@ namespace OpenSim.Services.Interfaces | |||
105 | public interface IGridUserService | 105 | public interface IGridUserService |
106 | { | 106 | { |
107 | GridUserInfo LoggedIn(string userID); | 107 | GridUserInfo LoggedIn(string userID); |
108 | bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); | 108 | |
109 | /// <summary> | ||
110 | /// Informs the grid that a user is logged out and to remove any session data for them | ||
111 | /// </summary> | ||
112 | /// <param name="userID">Ignore if your connector does not use userID for logouts</param> | ||
113 | /// <param name="sessionID">Ignore if your connector does not use sessionID for logouts</param> | ||
114 | /// <param name="regionID">RegionID where the user was last located</param> | ||
115 | /// <param name="lastPosition">Last region-relative position of the user</param> | ||
116 | /// <param name="lastLookAt">Last normalized look direction for the user</param> | ||
117 | /// <returns>True if the logout request was successfully processed, otherwise false</returns> | ||
118 | bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); | ||
109 | 119 | ||
110 | bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt); | 120 | bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt); |
111 | 121 | ||
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 00a1ae2..9b18915 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Services.UserAccountService | |||
92 | return GetGridUserInfo(userID); | 92 | return GetGridUserInfo(userID); |
93 | } | 93 | } |
94 | 94 | ||
95 | public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 95 | public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
96 | { | 96 | { |
97 | m_log.DebugFormat("[GRID USER SERVICE]: User {0} is offline", userID); | 97 | m_log.DebugFormat("[GRID USER SERVICE]: User {0} is offline", userID); |
98 | GridUserData d = m_Database.Get(userID); | 98 | GridUserData d = m_Database.Get(userID); |