Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

Conflicts:
	OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
avinationmerge
ubit 2012-07-16 00:01:05 +02:00
commit 13e1635e4d
1 changed files with 23 additions and 2 deletions

View File

@ -701,10 +701,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// UseCircuitCode handling // UseCircuitCode handling
if (packet.Type == PacketType.UseCircuitCode) if (packet.Type == PacketType.UseCircuitCode)
{ {
lock (m_pendingCache)
{
if (m_pendingCache.Contains(address))
return;
m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60);
}
object[] array = new object[] { buffer, packet }; object[] array = new object[] { buffer, packet };
lock (m_pendingCache)
m_pendingCache.AddOrUpdate(address, new Queue<UDPPacketBuffer>(), 60);
Util.FireAndForget(HandleUseCircuitCode, array); Util.FireAndForget(HandleUseCircuitCode, array);
return; return;
@ -721,11 +727,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
Queue<UDPPacketBuffer> queue; Queue<UDPPacketBuffer> queue;
if (m_pendingCache.TryGetValue(address, out queue)) if (m_pendingCache.TryGetValue(address, out queue))
{
m_log.DebugFormat("[LLUDPSERVER]: Enqueued a {0} packet into the pending queue", packet.Type);
queue.Enqueue(buffer); queue.Enqueue(buffer);
}
else
{
m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName);
}
} }
<<<<<<< HEAD
// m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); // m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName);
>>>>>>> 2606484e45138adef289386509b1e27552a32aee >>>>>>> 2606484e45138adef289386509b1e27552a32aee
=======
>>>>>>> 0baa1b557af20af3590737dc04294a9bdc8e8728
return; return;
} }
@ -968,10 +984,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
lock (m_pendingCache) lock (m_pendingCache)
{ {
if (!m_pendingCache.TryGetValue(remoteEndPoint, out queue)) if (!m_pendingCache.TryGetValue(remoteEndPoint, out queue))
{
m_log.DebugFormat("[LLUDPSERVER]: Client created but no pending queue present");
return; return;
}
m_pendingCache.Remove(remoteEndPoint); m_pendingCache.Remove(remoteEndPoint);
} }
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)
{ {