Stop error messages being misleadingly generated when on client connection activity timeout, a root connection triggers a CloseAgent to a neighbour region which has already closed the agent due to inactivity.

Also separates out log messages to distinguish between close not finding an agent and wrong auth token, and downgrades former to debug and latter to warn
0.7.6-extended
Justin Clark-Casey (justincc) 2013-08-22 22:44:43 +01:00
parent 66a7dc3a0d
commit 416bbe9583
1 changed files with 19 additions and 2 deletions

View File

@ -4416,10 +4416,27 @@ namespace OpenSim.Region.Framework.Scenes
// Check that the auth_token is valid
AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID);
if (acd != null && acd.SessionID.ToString() == auth_token)
if (acd == null)
{
m_log.DebugFormat(
"[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.",
agentID, Name);
return false;
}
if (acd.SessionID.ToString() == auth_token)
{
return IncomingCloseAgent(agentID, force);
}
else
m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token);
{
m_log.WarnFormat(
"[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}",
agentID, auth_token, Name);
}
return false;
}