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
This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-08 19:25:24 +00:00
parent 55de189752
commit 0e265889dd
4 changed files with 10 additions and 19 deletions

View File

@@ -897,12 +897,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
IClientAPI client = AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
// Send ack straight away to let the viewer know that the connection is active.
// The client will be null if it already exists (e.g. if on a region crossing the client sends a use
// circuit code to the existing child agent. This is not particularly obvious.
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
// FIXME: Nasty - this is the only way we currently know if Scene.AddNewClient() failed to find a
// circuit and bombed out early. That check might be pointless since authorization is established
// up here.
if (client != null && client.SceneAgent != null)
// We only want to send initial data to new clients, not ones which are being converted from child to root.
if (client != null)
client.SceneAgent.SendInitialDataToMe();
// m_log.DebugFormat(