* Coded around another Null packet sent by the packet pool

* Condensed 8 calls to unmanaged code in ODE down to 1
This commit is contained in:
Teravus Ovares
2007-12-26 04:23:36 +00:00
parent 2259bc8ebf
commit 0e460a81cc
2 changed files with 48 additions and 27 deletions

View File

@@ -293,26 +293,29 @@ namespace OpenSim.Region.ClientStack
//MainLog.Instance.Debug("UDPSERVER", e.ToString());
}
// do we already have a circuit for this endpoint
uint circuit;
if (clientCircuits.TryGetValue(epSender, out circuit))
{
//if so then send packet to the packetserver
//MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!");
m_packetServer.InPacket(circuit, packet);
}
else if (packet.Type == PacketType.UseCircuitCode)
{
// new client
MainLog.Instance.Debug("UDPSERVER", "Adding New Client");
AddNewClient(packet);
}
else
if (packet != null)
{
// do we already have a circuit for this endpoint
uint circuit;
if (clientCircuits.TryGetValue(epSender, out circuit))
{
//if so then send packet to the packetserver
//MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!");
m_packetServer.InPacket(circuit, packet);
}
else if (packet.Type == PacketType.UseCircuitCode)
{
// new client
MainLog.Instance.Debug("UDPSERVER", "Adding New Client");
AddNewClient(packet);
}
else
{
// invalid client
//CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
//m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString());
// invalid client
//CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
//m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString());
}
}
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);