mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Use GetAgentCircuits() to receive a copy of the AgentCircuitsByUUID dictionary rather than AgentCircuitManager.AgentCircuits directly in "show circuits" to avoid enumeration exceptions
This commit is contained in:
@@ -1039,7 +1039,7 @@ namespace OpenSim
|
||||
{
|
||||
//this.HttpServer.
|
||||
acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
|
||||
foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values)
|
||||
foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values)
|
||||
acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root"));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -103,15 +103,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||
ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
|
||||
|
||||
Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Not.Null);
|
||||
Assert.That(scene.AuthenticateHandler.AgentCircuits.Count, Is.EqualTo(1));
|
||||
Assert.That(scene.AuthenticateHandler.AgentCircuitsByUUID.Count, Is.EqualTo(1));
|
||||
Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
|
||||
|
||||
scene.IncomingCloseAgent(sp.UUID);
|
||||
|
||||
Assert.That(scene.GetScenePresence(sp.UUID), Is.Null);
|
||||
Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null);
|
||||
Assert.That(scene.AuthenticateHandler.AgentCircuits.Count, Is.EqualTo(0));
|
||||
Assert.That(scene.AuthenticateHandler.AgentCircuitsByUUID.Count, Is.EqualTo(0));
|
||||
Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user