aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-14 19:35:02 +0100
committerJustin Clark-Casey (justincc)2013-08-14 19:36:52 +0100
commitfd519748e9c828e03468dc61b331115f07b3fadd (patch)
tree3c47085c6a0030df138e3ea6b4517d80cc8c6ee6 /OpenSim/Region
parentShutdown a bot's actions by making it check for disconnecting state rather th... (diff)
downloadopensim-SC_OLD-fd519748e9c828e03468dc61b331115f07b3fadd.zip
opensim-SC_OLD-fd519748e9c828e03468dc61b331115f07b3fadd.tar.gz
opensim-SC_OLD-fd519748e9c828e03468dc61b331115f07b3fadd.tar.bz2
opensim-SC_OLD-fd519748e9c828e03468dc61b331115f07b3fadd.tar.xz
Add method doc to Scene.RemoveClient() to ask any callers to use Scene.IncomingCloseAgent() instead.
IncomingCloseAgent() now sets the scene presence state machine properly, which is necessary to avoid races between multiple sources of close. Hence, it's also necessary for everyone to consistently call IncomingCloseAgent() Calling RemoveClient() directly is currently generating an attention-grabbing exception though this right now this is harmless.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs13
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a3bd388..d187377 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3382,6 +3382,18 @@ namespace OpenSim.Region.Framework.Scenes
3382 } 3382 }
3383 } 3383 }
3384 3384
3385 /// <summary>
3386 /// Remove the given client from the scene.
3387 /// </summary>
3388 /// <remarks>
3389 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead
3390 /// to properly operate the state machine and avoid race conditions with other close requests (such as directly
3391 /// from viewers).
3392 /// </remarks>
3393 /// <param name='agentID'>ID of agent to close</param>
3394 /// <param name='closeChildAgents'>
3395 /// Close the neighbour child agents associated with this client.
3396 /// </param>
3385 public override void RemoveClient(UUID agentID, bool closeChildAgents) 3397 public override void RemoveClient(UUID agentID, bool closeChildAgents)
3386 { 3398 {
3387 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); 3399 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID);
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index d2097ea..5252b96 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -217,6 +217,19 @@ namespace OpenSim.Region.Framework.Scenes
217 #region Add/Remove Agent/Avatar 217 #region Add/Remove Agent/Avatar
218 218
219 public abstract ISceneAgent AddNewClient(IClientAPI client, PresenceType type); 219 public abstract ISceneAgent AddNewClient(IClientAPI client, PresenceType type);
220
221 /// <summary>
222 /// Remove the given client from the scene.
223 /// </summary>
224 /// <remarks>
225 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead
226 /// to properly operate the state machine and avoid race conditions with other close requests (such as directly
227 /// from viewers).
228 /// </remarks>
229 /// <param name='agentID'>ID of agent to close</param>
230 /// <param name='closeChildAgents'>
231 /// Close the neighbour child agents associated with this client.
232 /// </param>
220 public abstract void RemoveClient(UUID agentID, bool closeChildAgents); 233 public abstract void RemoveClient(UUID agentID, bool closeChildAgents);
221 234
222 public bool TryGetScenePresence(UUID agentID, out object scenePresence) 235 public bool TryGetScenePresence(UUID agentID, out object scenePresence)