Comment out old Scene.HandleLogOffUserFromGrid() to reduce client closing analysis complexity

0.7.3-extended
Justin Clark-Casey (justincc) 2012-04-26 16:20:53 +01:00
parent 36a99af37c
commit 2d3135448c
1 changed files with 35 additions and 35 deletions

View File

@ -3799,41 +3799,41 @@ namespace OpenSim.Region.Framework.Scenes
return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc);
} }
/// <summary> // /// <summary>
/// The Grid has requested that we log-off a user. Log them off. // /// The Grid has requested that we log-off a user. Log them off.
/// </summary> // /// </summary>
/// <param name="AvatarID">Unique ID of the avatar to log-off</param> // /// <param name="AvatarID">Unique ID of the avatar to log-off</param>
/// <param name="RegionSecret">SecureSessionID of the user, or the RegionSecret text when logging on to the grid</param> // /// <param name="RegionSecret">SecureSessionID of the user, or the RegionSecret text when logging on to the grid</param>
/// <param name="message">message to display to the user. Reason for being logged off</param> // /// <param name="message">message to display to the user. Reason for being logged off</param>
public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message) // public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message)
{ // {
ScenePresence loggingOffUser = GetScenePresence(AvatarID); // ScenePresence loggingOffUser = GetScenePresence(AvatarID);
if (loggingOffUser != null) // if (loggingOffUser != null)
{ // {
UUID localRegionSecret = UUID.Zero; // UUID localRegionSecret = UUID.Zero;
bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret); // bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret);
//
// Region Secret is used here in case a new sessionid overwrites an old one on the user server. // // Region Secret is used here in case a new sessionid overwrites an old one on the user server.
// Will update the user server in a few revisions to use it. // // Will update the user server in a few revisions to use it.
//
if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId || (parsedsecret && RegionSecret == localRegionSecret)) // if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId || (parsedsecret && RegionSecret == localRegionSecret))
{ // {
m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, loggingOffUser.KnownRegionHandles); // m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, loggingOffUser.KnownRegionHandles);
loggingOffUser.ControllingClient.Kick(message); // loggingOffUser.ControllingClient.Kick(message);
// Give them a second to receive the message! // // Give them a second to receive the message!
Thread.Sleep(1000); // Thread.Sleep(1000);
loggingOffUser.ControllingClient.Close(); // loggingOffUser.ControllingClient.Close();
} // }
else // else
{ // {
m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate"); // m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate");
} // }
} // }
else // else
{ // {
m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString()); // m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString());
} // }
} // }
/// <summary> /// <summary>
/// Triggered when an agent crosses into this sim. Also happens on initial login. /// Triggered when an agent crosses into this sim. Also happens on initial login.