Part two of the previous commit, making IGridUserService.LoggedOut() more flexible without changing current behavior
parent
9b7c99f0cf
commit
b6e0563ad7
|
@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
|
|||
}
|
||||
}
|
||||
m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
|
||||
m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat);
|
||||
m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -152,9 +152,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
|
|||
return m_GridUserService.LoggedIn(userID);
|
||||
}
|
||||
|
||||
public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
{
|
||||
return m_GridUserService.LoggedOut(userID, regionID, lastPosition, lastLookAt);
|
||||
return m_GridUserService.LoggedOut(userID, sessionID, regionID, lastPosition, lastLookAt);
|
||||
}
|
||||
|
||||
public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt)
|
||||
|
|
|
@ -126,9 +126,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
|
|||
return null;
|
||||
}
|
||||
|
||||
public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat)
|
||||
public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat)
|
||||
{
|
||||
return m_RemoteConnector.LoggedOut(userID, region, position, lookat);
|
||||
return m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace OpenSim.Server.Handlers.GridUser
|
|||
if (!UnpackArgs(request, out userID, out regionID, out position, out lookat))
|
||||
return FailureResult();
|
||||
|
||||
if (m_GridUserService.LoggedOut(userID, regionID, position, lookat))
|
||||
if (m_GridUserService.LoggedOut(userID, UUID.Zero, regionID, position, lookat))
|
||||
return SuccessResult();
|
||||
|
||||
return FailureResult();
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Services.Connectors
|
|||
|
||||
}
|
||||
|
||||
public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat)
|
||||
public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat)
|
||||
{
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
//sendData["SCOPEID"] = scopeID.ToString();
|
||||
|
|
|
@ -40,7 +40,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IGridUserService m_GridUserService;
|
||||
private Scene m_aScene;
|
||||
|
||||
public SimianActivityDetector(IGridUserService guService)
|
||||
{
|
||||
|
@ -55,9 +54,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel;
|
||||
|
||||
if (m_aScene == null)
|
||||
m_aScene = scene;
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
|
@ -102,7 +98,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
}
|
||||
|
||||
m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
|
||||
m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat);
|
||||
m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
return null;
|
||||
}
|
||||
|
||||
public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
{
|
||||
// Save our last position as user data
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
|
|
|
@ -232,7 +232,7 @@ namespace OpenSim.Services.HypergridService
|
|||
|
||||
GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString());
|
||||
if (guinfo != null)
|
||||
m_GridUserService.LoggedOut(userID.ToString(), guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt);
|
||||
m_GridUserService.LoggedOut(userID.ToString(), sessionID, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt);
|
||||
}
|
||||
|
||||
// We need to prevent foreign users with the same UUID as a local user
|
||||
|
|
|
@ -105,7 +105,17 @@ namespace OpenSim.Services.Interfaces
|
|||
public interface IGridUserService
|
||||
{
|
||||
GridUserInfo LoggedIn(string userID);
|
||||
bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
|
||||
|
||||
/// <summary>
|
||||
/// Informs the grid that a user is logged out and to remove any session data for them
|
||||
/// </summary>
|
||||
/// <param name="userID">Ignore if your connector does not use userID for logouts</param>
|
||||
/// <param name="sessionID">Ignore if your connector does not use sessionID for logouts</param>
|
||||
/// <param name="regionID">RegionID where the user was last located</param>
|
||||
/// <param name="lastPosition">Last region-relative position of the user</param>
|
||||
/// <param name="lastLookAt">Last normalized look direction for the user</param>
|
||||
/// <returns>True if the logout request was successfully processed, otherwise false</returns>
|
||||
bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
|
||||
|
||||
bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt);
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace OpenSim.Services.UserAccountService
|
|||
return GetGridUserInfo(userID);
|
||||
}
|
||||
|
||||
public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
|
||||
{
|
||||
m_log.DebugFormat("[GRID USER SERVICE]: User {0} is offline", userID);
|
||||
GridUserData d = m_Database.Get(userID);
|
||||
|
|
Loading…
Reference in New Issue