diff options
author | Teravus Ovares | 2007-12-22 14:02:50 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-22 14:02:50 +0000 |
commit | b64deca32f1a425cc6d6d4dc366d87d5c9b64288 (patch) | |
tree | 7898a3c9545d1337694708cd954c1219d0e425e2 /OpenSim | |
parent | * Fixed general avatar bounciness in ODE (diff) | |
download | opensim-SC-b64deca32f1a425cc6d6d4dc366d87d5c9b64288.zip opensim-SC-b64deca32f1a425cc6d6d4dc366d87d5c9b64288.tar.gz opensim-SC-b64deca32f1a425cc6d6d4dc366d87d5c9b64288.tar.bz2 opensim-SC-b64deca32f1a425cc6d6d4dc366d87d5c9b64288.tar.xz |
* Masochistically updated libsecondlife.dll to r1550
* after some tweaking to the UDPServer all appears to be well
* Added what 'was' the GetType(bytes,packetEnd,zeroBuffer) to the UDPServer. (it was removed as a static method from Packet)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 31 |
1 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 | { |