From 23ea8f5221d35aad9b80edf72343b0adb2a15ddc Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 20 Sep 2008 19:05:00 +0000 Subject: [PATCH] * refactor: remove unnecessary packet null check in LLClientView * if a packet was really null it would be caught by the general exception handler at the top of the client thread, which would also provide more information and attempt a clean shutdown --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 15 ++++++++------- .../Region/ClientStack/LindenUDP/LLPacketQueue.cs | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a55ce1c36d..bd67f1ed0a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -645,23 +645,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + /// + /// Main packet processing loop for the UDP component of the client session. Both incoming and outgoing + /// packets are processed here. + /// protected virtual void ClientLoop() { - m_log.Info("[CLIENT]: Entered main packet processing loop"); + m_log.DebugFormat( + "[CLIENT]: Entered main packet processing loop for {0} {1}", FirstName, LastName); while (true) { LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue(); - if (nextPacket == null) - { - m_log.Error("Got a NULL packet in Client Loop, bailing out of our client loop"); - break; - } + if (nextPacket.Incoming) { DebugPacket("IN", nextPacket.Packet); m_PacketHandler.ProcessInPacket(nextPacket); - } + } else { DebugPacket("OUT", nextPacket.Packet); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 1e369ec288..32b4bc1158 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -135,7 +135,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /* STANDARD QUEUE MANIPULATION INTERFACES */ - public void Enqueue(LLQueItem item) { if (!m_enabled)