aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs31
-rw-r--r--bin/libsecondlife.dllbin1649152 -> 1560576 bytes
2 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 5cad041..3455b5a 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -77,13 +77,42 @@ namespace OpenSim.Region.ClientStack
77 } 77 }
78 78
79 public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer) { 79 public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer) {
80 Packet packet = GetPacket(Packet.GetType(bytes, packetEnd, zeroBuffer)); 80 Packet packet = GetPacket(GetType(bytes, packetEnd, zeroBuffer));
81 81
82 int i = 0; 82 int i = 0;
83 packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer); 83 packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
84 return packet; 84 return packet;
85 } 85 }
86 public PacketType GetType(byte[] bytes, int packetEnd, byte[] zeroBuffer)
87 {
88 //Function removed from LibSL revision 1540
89 // We're using it.. so Built it into UDP server for now..
90 ushort id; libsecondlife.PacketFrequency freq;
91 int i = 0, end = packetEnd;
92 Header header = Header.BuildHeader(bytes, ref i, ref end);
93 if (header.Zerocoded)
94 {
95 end = libsecondlife.Helpers.ZeroDecode(bytes, end + 1, zeroBuffer) - 1;
96 bytes = zeroBuffer;
97 }
86 98
99 if (bytes[6] == 0xFF)
100 {
101 if (bytes[7] == 0xFF)
102 {
103 id = (ushort)((bytes[8] << 8) + bytes[9]); freq = libsecondlife.PacketFrequency.Low;
104 }
105 else
106 {
107 id = (ushort)bytes[7]; freq = libsecondlife.PacketFrequency.Medium;
108 }
109 }
110 else
111 {
112 id = (ushort)bytes[6]; freq = libsecondlife.PacketFrequency.High;
113 }
114 return Packet.GetType(id, freq);
115 }
87 public void ReturnPacket(Packet packet) { 116 public void ReturnPacket(Packet packet) {
88 lock(pool) 117 lock(pool)
89 { 118 {
diff --git a/bin/libsecondlife.dll b/bin/libsecondlife.dll
index 2f813b1..6c20c19 100644
--- a/bin/libsecondlife.dll
+++ b/bin/libsecondlife.dll
Binary files differ