diff options
author | Teravus Ovares | 2007-12-26 04:23:36 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-26 04:23:36 +0000 |
commit | 0e460a81cc7e1c9eb4b5576f78e78400f05cf48a (patch) | |
tree | be375f5f0f693638db507bc533229f0c0ef546d8 /OpenSim/Region/ClientStack/UDPServer.cs | |
parent | * Added a -val heightfield value limiter so giant pits of death don't cause a... (diff) | |
download | opensim-SC-0e460a81cc7e1c9eb4b5576f78e78400f05cf48a.zip opensim-SC-0e460a81cc7e1c9eb4b5576f78e78400f05cf48a.tar.gz opensim-SC-0e460a81cc7e1c9eb4b5576f78e78400f05cf48a.tar.bz2 opensim-SC-0e460a81cc7e1c9eb4b5576f78e78400f05cf48a.tar.xz |
* Coded around another Null packet sent by the packet pool
* Condensed 8 calls to unmanaged code in ODE down to 1
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 3455b5a..a8a1ff6 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -293,26 +293,29 @@ namespace OpenSim.Region.ClientStack | |||
293 | //MainLog.Instance.Debug("UDPSERVER", e.ToString()); | 293 | //MainLog.Instance.Debug("UDPSERVER", e.ToString()); |
294 | } | 294 | } |
295 | 295 | ||
296 | // do we already have a circuit for this endpoint | 296 | if (packet != null) |
297 | uint circuit; | ||
298 | if (clientCircuits.TryGetValue(epSender, out circuit)) | ||
299 | { | ||
300 | //if so then send packet to the packetserver | ||
301 | //MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!"); | ||
302 | m_packetServer.InPacket(circuit, packet); | ||
303 | } | ||
304 | else if (packet.Type == PacketType.UseCircuitCode) | ||
305 | { | ||
306 | // new client | ||
307 | MainLog.Instance.Debug("UDPSERVER", "Adding New Client"); | ||
308 | AddNewClient(packet); | ||
309 | } | ||
310 | else | ||
311 | { | 297 | { |
298 | // do we already have a circuit for this endpoint | ||
299 | uint circuit; | ||
300 | if (clientCircuits.TryGetValue(epSender, out circuit)) | ||
301 | { | ||
302 | //if so then send packet to the packetserver | ||
303 | //MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!"); | ||
304 | m_packetServer.InPacket(circuit, packet); | ||
305 | } | ||
306 | else if (packet.Type == PacketType.UseCircuitCode) | ||
307 | { | ||
308 | // new client | ||
309 | MainLog.Instance.Debug("UDPSERVER", "Adding New Client"); | ||
310 | AddNewClient(packet); | ||
311 | } | ||
312 | else | ||
313 | { | ||
312 | 314 | ||
313 | // invalid client | 315 | // invalid client |
314 | //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now | 316 | //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now |
315 | //m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString()); | 317 | //m_log.Warn("client", "Got a packet from an invalid client - " + epSender.ToString()); |
318 | } | ||
316 | } | 319 | } |
317 | 320 | ||
318 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 321 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |