The region proxy for the load balancer module works again. The incoming proxy messages were not properly decoded.
parent
0d02f53f87
commit
22b70495ab
|
@ -47,12 +47,6 @@ namespace OpenSim.Framework
|
|||
{
|
||||
bytes[numBytes++] = b;
|
||||
}
|
||||
|
||||
int x = numBytes;
|
||||
|
||||
DecodeProxyMessage(bytes, ref numBytes);
|
||||
|
||||
numBytes = x;
|
||||
}
|
||||
|
||||
public static IPEndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes)
|
||||
|
|
|
@ -220,15 +220,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
EndPoint epProxy = null;
|
||||
|
||||
// If we've received a use circuit packet, then we need to decode an endpoint proxy, if one exists, before
|
||||
// allowing the RecvBuffer to be overwritten by the next packet.
|
||||
if (proxyPortOffset != 0)
|
||||
{
|
||||
// If we've received a use circuit packet, then we need to decode an endpoint proxy, if one exists,
|
||||
// before allowing the RecvBuffer to be overwritten by the next packet.
|
||||
if (packet != null && packet.Type == PacketType.UseCircuitCode)
|
||||
{
|
||||
epProxy = epSender;
|
||||
if (proxyPortOffset != 0)
|
||||
{
|
||||
epSender = ProxyCodec.DecodeProxyMessage(RecvBuffer, ref numBytes);
|
||||
}
|
||||
|
||||
// Now decode the message from the proxy server
|
||||
epSender = ProxyCodec.DecodeProxyMessage(RecvBuffer, ref numBytes);
|
||||
}
|
||||
|
||||
BeginRobustReceive();
|
||||
|
@ -456,7 +458,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// ((useCircuit.Header.Sequence < uint.MaxValue) ? useCircuit.Header.Sequence : 0) is just a failsafe to ensure that we don't overflow.
|
||||
ack_it.Header.Sequence = ((useCircuit.Header.Sequence < uint.MaxValue) ? useCircuit.Header.Sequence : 0) + 1;
|
||||
ack_it.Header.Reliable = false;
|
||||
SendPacketTo(ack_it.ToBytes(), ack_it.ToBytes().Length, SocketFlags.None, useCircuit.CircuitCode.Code);
|
||||
|
||||
byte[] ackmsg=ack_it.ToBytes();
|
||||
|
||||
// Need some extra space in case we need to add proxy
|
||||
// information to the message later
|
||||
byte[] msg = new byte[4096];
|
||||
Buffer.BlockCopy(ackmsg, 0, msg, 0, ackmsg.Length);
|
||||
|
||||
SendPacketTo(msg, ackmsg.Length, SocketFlags.None, useCircuit.CircuitCode.Code);
|
||||
|
||||
PacketPool.Instance.ReturnPacket(useCircuit);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue