diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | 59 |
1 files changed, 36 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 23118a2..4270222 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -196,13 +196,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
196 | // configuration! | 196 | // configuration! |
197 | // | 197 | // |
198 | 198 | ||
199 | if ((m_SynchronizeClient != null) && (!m_Client.IsActive)) | ||
200 | { | ||
201 | if (m_SynchronizeClient(m_Client.Scene, packet, | ||
202 | m_Client.AgentId, throttlePacketType)) | ||
203 | return; | ||
204 | } | ||
205 | |||
206 | packet.Header.Sequence = 0; | 199 | packet.Header.Sequence = 0; |
207 | 200 | ||
208 | lock (m_NeedAck) | 201 | lock (m_NeedAck) |
@@ -480,11 +473,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
480 | if (packet == null) | 473 | if (packet == null) |
481 | return; | 474 | return; |
482 | 475 | ||
483 | // If this client is on another partial instance, no need | 476 | // When too many acks are needed to be sent, the client sends |
484 | // to handle packets | 477 | // a packet consisting of acks only |
485 | // | 478 | // |
486 | if (!m_Client.IsActive && packet.Type != PacketType.LogoutRequest) | 479 | if (packet.Type == PacketType.PacketAck) |
487 | { | 480 | { |
481 | PacketAckPacket ackPacket = (PacketAckPacket)packet; | ||
482 | |||
483 | foreach (PacketAckPacket.PacketsBlock block in | ||
484 | ackPacket.Packets) | ||
485 | { | ||
486 | ProcessAck(block.ID); | ||
487 | } | ||
488 | |||
488 | PacketPool.Instance.ReturnPacket(packet); | 489 | PacketPool.Instance.ReturnPacket(packet); |
489 | return; | 490 | return; |
490 | } | 491 | } |
@@ -500,26 +501,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
500 | } | 501 | } |
501 | } | 502 | } |
502 | 503 | ||
503 | // When too many acks are needed to be sent, the client sends | 504 | // If this client is on another partial instance, no need |
504 | // a packet consisting of acks only | 505 | // to handle packets |
505 | // | 506 | // |
506 | if (packet.Type == PacketType.PacketAck) | 507 | if (!m_Client.IsActive && packet.Type != PacketType.LogoutRequest) |
507 | { | 508 | { |
508 | PacketAckPacket ackPacket = (PacketAckPacket)packet; | ||
509 | |||
510 | foreach (PacketAckPacket.PacketsBlock block in | ||
511 | ackPacket.Packets) | ||
512 | { | ||
513 | ProcessAck(block.ID); | ||
514 | } | ||
515 | |||
516 | PacketPool.Instance.ReturnPacket(packet); | 509 | PacketPool.Instance.ReturnPacket(packet); |
517 | return; | 510 | return; |
518 | } | 511 | } |
519 | else if (packet.Type == PacketType.StartPingCheck) | 512 | |
513 | if (packet.Type == PacketType.StartPingCheck) | ||
520 | { | 514 | { |
521 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; | 515 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; |
522 | CompletePingCheckPacket endPing | 516 | CompletePingCheckPacket endPing |
523 | = (CompletePingCheckPacket)PacketPool.Instance.GetPacket(PacketType.CompletePingCheck); | 517 | = (CompletePingCheckPacket)PacketPool.Instance.GetPacket(PacketType.CompletePingCheck); |
524 | 518 | ||
525 | endPing.PingID.PingID = startPing.PingID.PingID; | 519 | endPing.PingID.PingID = startPing.PingID.PingID; |
@@ -639,6 +633,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
639 | 633 | ||
640 | info.sequence = m_Sequence; | 634 | info.sequence = m_Sequence; |
641 | 635 | ||
636 | float multiplier = m_PacketQueue.ThrottleMultiplier; | ||
637 | info.resendThrottle = (int) (m_PacketQueue.ResendThrottle.Throttle / multiplier); | ||
638 | info.landThrottle = (int) (m_PacketQueue.LandThrottle.Throttle / multiplier); | ||
639 | info.windThrottle = (int) (m_PacketQueue.WindThrottle.Throttle / multiplier); | ||
640 | info.cloudThrottle = (int) (m_PacketQueue.CloudThrottle.Throttle / multiplier); | ||
641 | info.taskThrottle = (int) (m_PacketQueue.TaskThrottle.Throttle / multiplier); | ||
642 | info.assetThrottle = (int) (m_PacketQueue.AssetThrottle.Throttle / multiplier); | ||
643 | info.textureThrottle = (int) (m_PacketQueue.TextureThrottle.Throttle / multiplier); | ||
644 | info.totalThrottle = (int) (m_PacketQueue.TotalThrottle.Throttle / multiplier); | ||
645 | |||
642 | return info; | 646 | return info; |
643 | } | 647 | } |
644 | 648 | ||
@@ -676,6 +680,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
676 | } | 680 | } |
677 | 681 | ||
678 | m_Sequence = info.sequence; | 682 | m_Sequence = info.sequence; |
683 | |||
684 | m_PacketQueue.ResendThrottle.Throttle = info.resendThrottle; | ||
685 | m_PacketQueue.LandThrottle.Throttle = info.landThrottle; | ||
686 | m_PacketQueue.WindThrottle.Throttle = info.windThrottle; | ||
687 | m_PacketQueue.CloudThrottle.Throttle = info.cloudThrottle; | ||
688 | m_PacketQueue.TaskThrottle.Throttle = info.taskThrottle; | ||
689 | m_PacketQueue.AssetThrottle.Throttle = info.assetThrottle; | ||
690 | m_PacketQueue.TextureThrottle.Throttle = info.textureThrottle; | ||
691 | m_PacketQueue.TotalThrottle.Throttle = info.totalThrottle; | ||
679 | } | 692 | } |
680 | 693 | ||
681 | public void AddImportantPacket(PacketType type) | 694 | public void AddImportantPacket(PacketType type) |