mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
* Changed IPresenceService Logout, so that it takes a position and a lookat
* CommsManager.AvatarService rerouted
This commit is contained in:
@@ -132,7 +132,7 @@ namespace OpenSim.Services.Connectors
|
||||
|
||||
}
|
||||
|
||||
public bool LogoutAgent(UUID sessionID)
|
||||
public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat)
|
||||
{
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
//sendData["SCOPEID"] = scopeID.ToString();
|
||||
@@ -141,6 +141,8 @@ namespace OpenSim.Services.Connectors
|
||||
sendData["METHOD"] = "logout";
|
||||
|
||||
sendData["SessionID"] = sessionID.ToString();
|
||||
sendData["Position"] = position.ToString();
|
||||
sendData["LookAt"] = lookat.ToString();
|
||||
|
||||
string reqString = ServerUtils.BuildQueryString(sendData);
|
||||
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace OpenSim.Services.Interfaces
|
||||
public interface IPresenceService
|
||||
{
|
||||
bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID);
|
||||
bool LogoutAgent(UUID sessionID);
|
||||
bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookAt);
|
||||
bool LogoutRegionAgents(UUID regionID);
|
||||
|
||||
bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt);
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
GridRegion destination = FindDestination(account, presence, session, startLocation, out where, out position, out lookAt);
|
||||
if (destination == null)
|
||||
{
|
||||
m_PresenceService.LogoutAgent(session);
|
||||
m_PresenceService.LogoutAgent(session, presence.Position, presence.LookAt);
|
||||
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: destination not found");
|
||||
return LLFailedLoginResponse.GridProblem;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
}
|
||||
if (aCircuit == null)
|
||||
{
|
||||
m_PresenceService.LogoutAgent(session);
|
||||
m_PresenceService.LogoutAgent(session, presence.Position, presence.LookAt);
|
||||
m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason);
|
||||
return LLFailedLoginResponse.AuthorizationProblem;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
{
|
||||
m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2}", firstName, lastName, e.StackTrace);
|
||||
if (m_PresenceService != null)
|
||||
m_PresenceService.LogoutAgent(session);
|
||||
m_PresenceService.LogoutAgent(session, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
|
||||
return LLFailedLoginResponse.InternalError;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace OpenSim.Services.PresenceService
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool LogoutAgent(UUID sessionID)
|
||||
public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat)
|
||||
{
|
||||
PresenceData data = m_Database.Get(sessionID);
|
||||
if (data == null)
|
||||
@@ -103,6 +103,8 @@ namespace OpenSim.Services.PresenceService
|
||||
|
||||
data.Data["Online"] = "false";
|
||||
data.Data["Logout"] = Util.UnixTimeSinceEpoch().ToString();
|
||||
data.Data["Position"] = position.ToString();
|
||||
data.Data["LookAt"] = lookat.ToString();
|
||||
|
||||
m_Database.Store(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user