From 20b3cab5d1cb1bbbe951a90ae6de7ffb495e6375 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 12 Aug 2014 23:57:41 +0100 Subject: take agentUpdate checks out of llUDPserver (disabling useless debug) and do it only where its supposed to be done.. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 0bb53c4..15d0316 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -731,7 +731,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP "debug lludp status", "Return status of LLUDP packet processing.", HandleStatusCommand); - +/* disabled MainConsole.Instance.Commands.AddCommand( "Debug", false, @@ -739,6 +739,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP "debug lludp toggle agentupdate", "Toggle whether agentupdate packets are processed or simply discarded.", HandleAgentUpdateCommand); + */ } private void HandlePacketCommand(string module, string[] args) @@ -1553,24 +1554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length); #endregion BinaryStats - if (packet.Type == PacketType.AgentUpdate) - { - if (m_discardAgentUpdates) - return; - - ((LLClientView)client).TotalAgentUpdates++; - - AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; - - LLClientView llClient = client as LLClientView; - if (agentUpdate.AgentData.SessionID != client.SessionId - || agentUpdate.AgentData.AgentID != client.AgentId - || !(llClient == null || llClient.CheckAgentUpdateSignificance(agentUpdate.AgentData)) ) - { - PacketPool.Instance.ReturnPacket(packet); - return; - } - } +// AgentUpdate mess removed from here #region Ping Check Handling -- cgit v1.1 From 0760fa3106955147d9a4dc96e5ef81635275c164 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 13 Aug 2014 00:17:03 +0100 Subject: process AgentUpdates in order with rest of packets. Only give higher priority to chat --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 15d0316..2e9ac4c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1595,11 +1595,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP incomingPacket = new IncomingPacket((LLClientView)client, packet); } - if (incomingPacket.Packet.Type == PacketType.AgentUpdate || - incomingPacket.Packet.Type == PacketType.ChatFromViewer) +// if (incomingPacket.Packet.Type == PacketType.AgentUpdate || +// incomingPacket.Packet.Type == PacketType.ChatFromViewer) + if (incomingPacket.Packet.Type == PacketType.ChatFromViewer) packetInbox.EnqueueHigh(incomingPacket); else packetInbox.EnqueueLow(incomingPacket); + } #region BinaryStats -- cgit v1.1 From cf48b814ebbc28761571c1b219376da445f844c9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 13 Aug 2014 01:42:16 +0100 Subject: remove HandleCompleteMovementIntoRegion delay hack from llUDPserver. If we need a delay, we need to do it at end of HandleUseCircuitCode before feeding pending packets (including that one) into processing queue. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 2e9ac4c..fe79f87 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1422,6 +1422,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; } +/* else if (packet.Type == PacketType.CompleteAgentMovement) { // Send ack straight away to let the viewer know that we got it. @@ -1435,6 +1436,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; } + */ } // Determine which agent this packet came from @@ -1718,7 +1720,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP try { - // DateTime startTime = DateTime.Now; +// DateTime startTime = DateTime.Now; object[] array = (object[])o; endPoint = (IPEndPoint)array[0]; UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; @@ -1738,9 +1740,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP uccp.CircuitCode.SessionID, endPoint, sessionInfo); - + // Now we know we can handle more data -// Thread.Sleep(200); + Thread.Sleep(200); // Obtain the pending queue and remove it from the cache Queue queue = null; @@ -1751,6 +1753,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.DebugFormat("[LLUDPSERVER]: Client created but no pending queue present"); return; + } m_pendingCache.Remove(endPoint); } @@ -1758,11 +1761,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); // Reinject queued packets - while(queue.Count > 0) + while (queue.Count > 0) { UDPPacketBuffer buf = queue.Dequeue(); PacketReceived(buf); } + queue = null; // Send ack straight away to let the viewer know that the connection is active. @@ -1788,8 +1792,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP uccp.CircuitCode.ID, m_scene.RegionInfo.RegionName, uccp.CircuitCode.Code, endPoint); lock (m_pendingCache) m_pendingCache.Remove(endPoint); - } - + } // m_log.DebugFormat( // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); @@ -1806,8 +1809,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP e.StackTrace); } } - - private void HandleCompleteMovementIntoRegion(object o) +/* + private void HandleCompleteMovementIntoRegion(object o) { IPEndPoint endPoint = null; IClientAPI client = null; @@ -1916,6 +1919,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP e.StackTrace); } } +*/ /// /// Send an ack immediately to the given endpoint. @@ -2053,7 +2057,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_incomingPacketPool.ReturnObject(incomingPacket); } } - catch (Exception ex) + catch(Exception ex) { m_log.Error("[LLUDPSERVER]: Error in the incoming packet handler loop: " + ex.Message, ex); } -- cgit v1.1