remove HandleCompleteMovementIntoRegion delay hack from llUDPserver. If we
need a delay, we need to do it at end of HandleUseCircuitCode before feeding pending packets (including that one) into processing queue.avinationmerge
parent
0760fa3106
commit
cf48b814eb
|
@ -5845,7 +5845,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_thisAgentUpdateArgs.Far = x.Far;
|
m_thisAgentUpdateArgs.Far = x.Far;
|
||||||
m_thisAgentUpdateArgs.Flags = x.Flags;
|
m_thisAgentUpdateArgs.Flags = x.Flags;
|
||||||
m_thisAgentUpdateArgs.HeadRotation = x.HeadRotation;
|
m_thisAgentUpdateArgs.HeadRotation = x.HeadRotation;
|
||||||
m_thisAgentUpdateArgs.SessionID = x.SessionID;
|
// m_thisAgentUpdateArgs.SessionID = x.SessionID;
|
||||||
m_thisAgentUpdateArgs.State = x.State;
|
m_thisAgentUpdateArgs.State = x.State;
|
||||||
|
|
||||||
UpdateAgent handlerAgentUpdate = OnAgentUpdate;
|
UpdateAgent handlerAgentUpdate = OnAgentUpdate;
|
||||||
|
@ -6762,8 +6762,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HandleCompleteAgentMovement(IClientAPI sender, Packet Pack)
|
private bool HandleCompleteAgentMovement(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat("[LLClientView] HandleCompleteAgentMovement");
|
||||||
|
|
||||||
Action<IClientAPI, bool> handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
|
Action<IClientAPI, bool> handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
|
||||||
if (handlerCompleteMovementToRegion != null)
|
if (handlerCompleteMovementToRegion != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1422,6 +1422,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
else if (packet.Type == PacketType.CompleteAgentMovement)
|
else if (packet.Type == PacketType.CompleteAgentMovement)
|
||||||
{
|
{
|
||||||
// Send ack straight away to let the viewer know that we got it.
|
// Send ack straight away to let the viewer know that we got it.
|
||||||
|
@ -1435,6 +1436,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine which agent this packet came from
|
// Determine which agent this packet came from
|
||||||
|
@ -1718,7 +1720,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// DateTime startTime = DateTime.Now;
|
// DateTime startTime = DateTime.Now;
|
||||||
object[] array = (object[])o;
|
object[] array = (object[])o;
|
||||||
endPoint = (IPEndPoint)array[0];
|
endPoint = (IPEndPoint)array[0];
|
||||||
UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1];
|
UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1];
|
||||||
|
@ -1738,9 +1740,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
uccp.CircuitCode.SessionID,
|
uccp.CircuitCode.SessionID,
|
||||||
endPoint,
|
endPoint,
|
||||||
sessionInfo);
|
sessionInfo);
|
||||||
|
|
||||||
// Now we know we can handle more data
|
// Now we know we can handle more data
|
||||||
// Thread.Sleep(200);
|
Thread.Sleep(200);
|
||||||
|
|
||||||
// Obtain the pending queue and remove it from the cache
|
// Obtain the pending queue and remove it from the cache
|
||||||
Queue<UDPPacketBuffer> queue = null;
|
Queue<UDPPacketBuffer> queue = null;
|
||||||
|
@ -1751,6 +1753,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[LLUDPSERVER]: Client created but no pending queue present");
|
m_log.DebugFormat("[LLUDPSERVER]: Client created but no pending queue present");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
m_pendingCache.Remove(endPoint);
|
m_pendingCache.Remove(endPoint);
|
||||||
}
|
}
|
||||||
|
@ -1758,11 +1761,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count);
|
m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count);
|
||||||
|
|
||||||
// Reinject queued packets
|
// Reinject queued packets
|
||||||
while(queue.Count > 0)
|
while (queue.Count > 0)
|
||||||
{
|
{
|
||||||
UDPPacketBuffer buf = queue.Dequeue();
|
UDPPacketBuffer buf = queue.Dequeue();
|
||||||
PacketReceived(buf);
|
PacketReceived(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
queue = null;
|
queue = null;
|
||||||
|
|
||||||
// Send ack straight away to let the viewer know that the connection is active.
|
// Send ack straight away to let the viewer know that the connection is active.
|
||||||
|
@ -1788,8 +1792,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
uccp.CircuitCode.ID, m_scene.RegionInfo.RegionName, uccp.CircuitCode.Code, endPoint);
|
uccp.CircuitCode.ID, m_scene.RegionInfo.RegionName, uccp.CircuitCode.Code, endPoint);
|
||||||
lock (m_pendingCache)
|
lock (m_pendingCache)
|
||||||
m_pendingCache.Remove(endPoint);
|
m_pendingCache.Remove(endPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
|
// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
|
||||||
// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
|
// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
|
||||||
|
@ -1806,8 +1809,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
e.StackTrace);
|
e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private void HandleCompleteMovementIntoRegion(object o)
|
private void HandleCompleteMovementIntoRegion(object o)
|
||||||
{
|
{
|
||||||
IPEndPoint endPoint = null;
|
IPEndPoint endPoint = null;
|
||||||
IClientAPI client = null;
|
IClientAPI client = null;
|
||||||
|
@ -1916,6 +1919,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
e.StackTrace);
|
e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send an ack immediately to the given endpoint.
|
/// Send an ack immediately to the given endpoint.
|
||||||
|
@ -2053,7 +2057,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_incomingPacketPool.ReturnObject(incomingPacket);
|
m_incomingPacketPool.ReturnObject(incomingPacket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
m_log.Error("[LLUDPSERVER]: Error in the incoming packet handler loop: " + ex.Message, ex);
|
m_log.Error("[LLUDPSERVER]: Error in the incoming packet handler loop: " + ex.Message, ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue