diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | 95 |
2 files changed, 50 insertions, 50 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3813367..74a8874 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -9919,6 +9919,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9919 | return info; | 9919 | return info; |
9920 | } | 9920 | } |
9921 | 9921 | ||
9922 | public EndPoint GetClientEP() | ||
9923 | { | ||
9924 | return m_userEndPoint; | ||
9925 | } | ||
9926 | |||
9922 | public void SetClientInfo(ClientInfo info) | 9927 | public void SetClientInfo(ClientInfo info) |
9923 | { | 9928 | { |
9924 | m_PacketHandler.SetClientInfo(info); | 9929 | m_PacketHandler.SetClientInfo(info); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index c0fb1c7..4b1a6b7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -643,28 +643,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
643 | { | 643 | { |
644 | ClientInfo info = new ClientInfo(); | 644 | ClientInfo info = new ClientInfo(); |
645 | 645 | ||
646 | // nobody seems to even look at the following data. since | 646 | info.pendingAcks = m_PendingAcksMap; |
647 | // it's a rather expensive operation (lock, serializing | 647 | info.needAck = new Dictionary<uint, byte[]>(); |
648 | // packets, copying it into dictionary, etc) i've | ||
649 | // commented out the expensive (but unwanted?) bits below | ||
650 | // (dr scofield, 2009-06-24) | ||
651 | 648 | ||
652 | // info.pendingAcks = m_PendingAcks; | 649 | lock (m_NeedAck) |
653 | // info.needAck = new Dictionary<uint, byte[]>(); | 650 | { |
654 | 651 | foreach (uint key in m_NeedAck.Keys) | |
655 | // lock (m_NeedAck) | 652 | info.needAck.Add(key, m_NeedAck[key].Packet.ToBytes()); |
656 | // { | 653 | } |
657 | // foreach (uint key in m_NeedAck.Keys) | ||
658 | // info.needAck.Add(key, m_NeedAck[key].Packet.ToBytes()); | ||
659 | // } | ||
660 | 654 | ||
661 | // LLQueItem[] queitems = m_PacketQueue.GetQueueArray(); | 655 | LLQueItem[] queitems = m_PacketQueue.GetQueueArray(); |
662 | 656 | ||
663 | // for (int i = 0; i < queitems.Length; i++) | 657 | for (int i = 0; i < queitems.Length; i++) |
664 | // { | 658 | { |
665 | // if (queitems[i].Incoming == false) | 659 | if (queitems[i].Incoming == false) |
666 | // info.out_packets.Add(queitems[i].Packet.ToBytes()); | 660 | info.out_packets.Add(queitems[i].Packet.ToBytes()); |
667 | // } | 661 | } |
668 | 662 | ||
669 | info.sequence = m_Sequence; | 663 | info.sequence = m_Sequence; |
670 | 664 | ||
@@ -683,37 +677,38 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
683 | 677 | ||
684 | public void SetClientInfo(ClientInfo info) | 678 | public void SetClientInfo(ClientInfo info) |
685 | { | 679 | { |
686 | // m_PendingAcks = info.pendingAcks; | 680 | m_PendingAcksMap = info.pendingAcks; |
687 | // m_NeedAck = new Dictionary<uint, LLQueItem>(); | 681 | m_PendingAcks = new List<uint>(m_PendingAcksMap.Keys); |
688 | 682 | m_NeedAck = new Dictionary<uint, LLQueItem>(); | |
689 | // Packet packet = null; | 683 | |
690 | // int packetEnd = 0; | 684 | Packet packet = null; |
691 | // byte[] zero = new byte[3000]; | 685 | int packetEnd = 0; |
692 | 686 | byte[] zero = new byte[3000]; | |
693 | // foreach (uint key in info.needAck.Keys) | 687 | |
694 | // { | 688 | foreach (uint key in info.needAck.Keys) |
695 | // byte[] buff = info.needAck[key]; | 689 | { |
696 | // packetEnd = buff.Length - 1; | 690 | byte[] buff = info.needAck[key]; |
697 | 691 | packetEnd = buff.Length - 1; | |
698 | // try | 692 | |
699 | // { | 693 | try |
700 | // packet = PacketPool.Instance.GetPacket(buff, ref packetEnd, zero); | 694 | { |
701 | // } | 695 | packet = PacketPool.Instance.GetPacket(buff, ref packetEnd, zero); |
702 | // catch (Exception) | 696 | } |
703 | // { | 697 | catch (Exception) |
704 | // } | 698 | { |
705 | 699 | } | |
706 | // LLQueItem item = new LLQueItem(); | 700 | |
707 | // item.Packet = packet; | 701 | LLQueItem item = new LLQueItem(); |
708 | // item.Incoming = false; | 702 | item.Packet = packet; |
709 | // item.throttleType = 0; | 703 | item.Incoming = false; |
710 | // item.TickCount = Environment.TickCount; | 704 | item.throttleType = 0; |
711 | // item.Identifier = 0; | 705 | item.TickCount = Environment.TickCount; |
712 | // item.Resends = 0; | 706 | item.Identifier = 0; |
713 | // item.Length = packet.Length; | 707 | item.Resends = 0; |
714 | // item.Sequence = packet.Header.Sequence; | 708 | item.Length = packet.Length; |
715 | // m_NeedAck.Add(key, item); | 709 | item.Sequence = packet.Header.Sequence; |
716 | // } | 710 | m_NeedAck.Add(key, item); |
711 | } | ||
717 | 712 | ||
718 | m_Sequence = info.sequence; | 713 | m_Sequence = info.sequence; |
719 | 714 | ||