diff options
author | Justin Clark-Casey (justincc) | 2012-08-20 20:24:54 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-20 20:24:54 +0100 |
commit | bcbd450fe441e94d6c0f547055b4e95f75a5b0d0 (patch) | |
tree | ad92a6256830933073261fe0f715b006fd94c341 /OpenSim/Region/Framework/Scenes | |
parent | Fix scripted detach of temp attachments (diff) | |
download | opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.zip opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.tar.gz opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.tar.bz2 opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.tar.xz |
Add --force flag to "kick user" console command to allow bypassing of recent race condition checks.
This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once).
You should only attempt --force if a normal kick fails.
This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive.
This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d2d6aba..ad74189 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4116,16 +4116,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
4116 | /// <summary> | 4116 | /// <summary> |
4117 | /// Tell a single agent to disconnect from the region. | 4117 | /// Tell a single agent to disconnect from the region. |
4118 | /// </summary> | 4118 | /// </summary> |
4119 | /// <param name="regionHandle"></param> | ||
4120 | /// <param name="agentID"></param> | 4119 | /// <param name="agentID"></param> |
4121 | public bool IncomingCloseAgent(UUID agentID) | 4120 | /// <param name="force"> |
4121 | /// Force the agent to close even if it might be in the middle of some other operation. You do not want to | ||
4122 | /// force unless you are absolutely sure that the agent is dead and a normal close is not working. | ||
4123 | /// </param> | ||
4124 | public bool IncomingCloseAgent(UUID agentID, bool force) | ||
4122 | { | 4125 | { |
4123 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); | 4126 | //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); |
4124 | 4127 | ||
4125 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); | 4128 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
4126 | if (presence != null) | 4129 | if (presence != null) |
4127 | { | 4130 | { |
4128 | presence.ControllingClient.Close(); | 4131 | presence.ControllingClient.Close(force); |
4129 | return true; | 4132 | return true; |
4130 | } | 4133 | } |
4131 | 4134 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index 5758869..5faf131 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | |||
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
141 | TestScene scene = new SceneHelpers().SetupScene(); | 141 | TestScene scene = new SceneHelpers().SetupScene(); |
142 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); | 142 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); |
143 | 143 | ||
144 | scene.IncomingCloseAgent(sp.UUID); | 144 | scene.IncomingCloseAgent(sp.UUID, false); |
145 | 145 | ||
146 | Assert.That(scene.GetScenePresence(sp.UUID), Is.Null); | 146 | Assert.That(scene.GetScenePresence(sp.UUID), Is.Null); |
147 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null); | 147 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null); |