aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-08 19:25:24 +0000
committerJustin Clark-Casey (justincc)2011-12-08 19:25:24 +0000
commit0e265889dd909d23b45175ec0e6f2d52725c008c (patch)
tree3f9d117d0f7a6a2303d0c562137abf198d072f96 /OpenSim/Region/Framework/Scenes/Scene.cs
parentminor: remove some mono compiler warnings (diff)
downloadopensim-SC_OLD-0e265889dd909d23b45175ec0e6f2d52725c008c.zip
opensim-SC_OLD-0e265889dd909d23b45175ec0e6f2d52725c008c.tar.gz
opensim-SC_OLD-0e265889dd909d23b45175ec0e6f2d52725c008c.tar.bz2
opensim-SC_OLD-0e265889dd909d23b45175ec0e6f2d52725c008c.tar.xz
Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists. This allows us to eliminate another null check elsewhere and simplifies the method contract
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
1 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d47536a..11505cc 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2486,21 +2486,14 @@ namespace OpenSim.Region.Framework.Scenes
2486 2486
2487 #region Add/Remove Avatar Methods 2487 #region Add/Remove Avatar Methods
2488 2488
2489 /// <summary>
2490 /// Add a new client and create a child scene presence for it.
2491 /// </summary>
2492 /// <param name="client"></param>
2493 /// <param name="type">The type of agent to add.</param>
2494 public override ISceneAgent AddNewClient(IClientAPI client, PresenceType type) 2489 public override ISceneAgent AddNewClient(IClientAPI client, PresenceType type)
2495 { 2490 {
2491 // Validation occurs in LLUDPServer
2496 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); 2492 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
2497 bool vialogin = false;
2498
2499 if (aCircuit == null) // no good, didn't pass NewUserConnection successfully
2500 return null;
2501 2493
2502 vialogin = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 || 2494 bool vialogin
2503 (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; 2495 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0
2496 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
2504 2497
2505 CheckHeartbeat(); 2498 CheckHeartbeat();
2506 2499