aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs28
1 files changed, 1 insertions, 27 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index c01f6d6..8dec185 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -30,7 +30,6 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Net.Sockets; 32using System.Net.Sockets;
33using System.Threading;
34using System.Reflection; 33using System.Reflection;
35using libsecondlife.Packets; 34using libsecondlife.Packets;
36using log4net; 35using log4net;
@@ -70,8 +69,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
70 protected AssetCache m_assetCache; 69 protected AssetCache m_assetCache;
71 protected AgentCircuitManager m_authenticateSessionsClass; 70 protected AgentCircuitManager m_authenticateSessionsClass;
72 71
73 protected Queue<Packet> CreateUserPacket = new Queue<Packet>();
74
75 public LLPacketServer PacketServer 72 public LLPacketServer PacketServer
76 { 73 {
77 get { return m_packetServer; } 74 get { return m_packetServer; }
@@ -239,6 +236,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
239 { 236 {
240 // new client 237 // new client
241 m_log.Debug("[UDPSERVER]: Adding New Client"); 238 m_log.Debug("[UDPSERVER]: Adding New Client");
239 AddNewClient(packet);
242 240
243 UseCircuitCodePacket p = (UseCircuitCodePacket)packet; 241 UseCircuitCodePacket p = (UseCircuitCodePacket)packet;
244 242
@@ -250,14 +248,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
250 ack_it.Packets[0].ID = packet.Header.Sequence; 248 ack_it.Packets[0].ID = packet.Header.Sequence;
251 ack_it.Header.Reliable = false; 249 ack_it.Header.Reliable = false;
252 SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code); 250 SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code);
253
254 // toss it to a worker thread so IOthread can go home
255 lock (CreateUserPacket)
256 {
257 CreateUserPacket.Enqueue(packet);
258 }
259 WaitCallback createUserCallback = new WaitCallback(AddNewClient);
260 ThreadPool.QueueUserWorkItem(createUserCallback);
261 } 251 }
262 } 252 }
263 catch (Exception e) 253 catch (Exception e)
@@ -321,22 +311,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
321 } 311 }
322 } 312 }
323 313
324 /// <summary>
325 /// target of workerthread delegate to create a new user.
326 /// It assumes we get fired for each new user packet that comes in.
327 /// </summary>
328 /// <param name="o"></param>
329 protected void AddNewClient(object o)
330 {
331 Packet packet;
332 lock (CreateUserPacket)
333 {
334 packet = CreateUserPacket.Dequeue();
335 }
336 if (null != packet)
337 AddNewClient(packet);
338 }
339
340 protected virtual void AddNewClient(Packet packet) 314 protected virtual void AddNewClient(Packet packet)
341 { 315 {
342 //Slave regions don't accept new clients 316 //Slave regions don't accept new clients