From 7652b3a957f4e124c5142a3480fcc09a97e08be9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 17 May 2012 13:13:31 +0100 Subject: udp transfer: make number packets estimation coerent with number actually sent. Use the safer lower max packet size defined in os source (600) and not OMV one (1100). --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7db6014..2d46a5b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -329,6 +329,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP private Prioritizer m_prioritizer; private bool m_disableFacelights = false; + private const uint MaxTransferBytesPerPacket = 600; + + /// /// List used in construction of data blocks for an object update packet. This is to stop us having to /// continually recreate it. @@ -2738,7 +2741,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP else { int processedLength = 0; - int maxChunkSize = Settings.MAX_PACKET_SIZE - 100; +// int maxChunkSize = Settings.MAX_PACKET_SIZE - 100; + + int maxChunkSize = (int) MaxTransferBytesPerPacket; int packetNumber = 0; while (processedLength < req.AssetInf.Data.Length) @@ -12202,7 +12207,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// private static int CalculateNumPackets(byte[] data) { - const uint m_maxPacketSize = 600; +// const uint m_maxPacketSize = 600; + uint m_maxPacketSize = MaxTransferBytesPerPacket; int numPackets = 1; if (data == null) -- cgit v1.1