aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorTom Grimshaw2010-05-18 01:09:47 -0700
committerTom Grimshaw2010-05-18 01:09:47 -0700
commit91b1d17e5bd3ff6ed006744bc529b53a67af1a64 (patch)
tree0d903e6526fd66151a43ff86dd674fe28b120cec /OpenSim/Region/ClientStack
parentWhile examining our 10,10,10 issue I discovered that several threads were loc... (diff)
downloadopensim-SC_OLD-91b1d17e5bd3ff6ed006744bc529b53a67af1a64.zip
opensim-SC_OLD-91b1d17e5bd3ff6ed006744bc529b53a67af1a64.tar.gz
opensim-SC_OLD-91b1d17e5bd3ff6ed006744bc529b53a67af1a64.tar.bz2
opensim-SC_OLD-91b1d17e5bd3ff6ed006744bc529b53a67af1a64.tar.xz
Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs37
1 files changed, 32 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 5670a78..df6a767 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -376,6 +376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
376 private AgentUpdateArgs lastarg; 376 private AgentUpdateArgs lastarg;
377 private bool m_IsActive = true; 377 private bool m_IsActive = true;
378 private bool m_IsLoggingOut = false; 378 private bool m_IsLoggingOut = false;
379 private bool m_IsPresenceReady = false;
379 380
380 protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); 381 protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>();
381 protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers 382 protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers
@@ -399,6 +400,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
399 400
400 private Timer m_propertiesPacketTimer; 401 private Timer m_propertiesPacketTimer;
401 private List<ObjectPropertiesPacket.ObjectDataBlock> m_propertiesBlocks = new List<ObjectPropertiesPacket.ObjectDataBlock>(); 402 private List<ObjectPropertiesPacket.ObjectDataBlock> m_propertiesBlocks = new List<ObjectPropertiesPacket.ObjectDataBlock>();
403 private List<Packet> m_pendingPackets;
402 404
403 #endregion Class Members 405 #endregion Class Members
404 406
@@ -439,6 +441,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
439 get { return m_IsActive; } 441 get { return m_IsActive; }
440 set { m_IsActive = value; } 442 set { m_IsActive = value; }
441 } 443 }
444
442 public bool IsLoggingOut 445 public bool IsLoggingOut
443 { 446 {
444 get { return m_IsLoggingOut; } 447 get { return m_IsLoggingOut; }
@@ -11196,18 +11199,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11196 } 11199 }
11197 11200
11198 /// <summary> 11201 /// <summary>
11202 /// This processes packets which have accumulated while the presence was still in the process of initialising.
11203 /// </summary>
11204 public void ProcessPendingPackets()
11205 {
11206 m_IsPresenceReady = true;
11207 foreach (Packet p in m_pendingPackets)
11208 {
11209 ProcessInPacket(p);
11210 }
11211 m_pendingPackets.Clear();
11212 }
11213
11214 /// <summary>
11199 /// Entryway from the client to the simulator. All UDP packets from the client will end up here 11215 /// Entryway from the client to the simulator. All UDP packets from the client will end up here
11200 /// </summary> 11216 /// </summary>
11201 /// <param name="Pack">OpenMetaverse.packet</param> 11217 /// <param name="Pack">OpenMetaverse.packet</param>
11202 public void ProcessInPacket(Packet Pack) 11218 public void ProcessInPacket(Packet Pack)
11203 { 11219 {
11204 if (m_debugPacketLevel >= 255) 11220 if (!m_IsPresenceReady)
11205 m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); 11221 {
11222 if (m_pendingPackets == null)
11223 {
11224 m_pendingPackets = new List<Packet>();
11225 }
11226 m_pendingPackets.Add(Pack);
11227 }
11228 else
11229 {
11230 if (m_debugPacketLevel >= 255)
11231 m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type);
11206 11232
11207 if (!ProcessPacketMethod(Pack)) 11233 if (!ProcessPacketMethod(Pack))
11208 m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); 11234 m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type);
11209 11235
11210 PacketPool.Instance.ReturnPacket(Pack); 11236 PacketPool.Instance.ReturnPacket(Pack);
11237 }
11211 } 11238 }
11212 11239
11213 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) 11240 private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)