aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs94
1 files changed, 47 insertions, 47 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 69dd48f..59083c7 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack
226 226
227 try 227 try
228 { 228 {
229 packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 229 packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
230 } 230 }
231 catch (Exception e) 231 catch (Exception e)
232 { 232 {
@@ -308,7 +308,7 @@ namespace OpenSim.Region.ClientStack
308 { 308 {
309 m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString()); 309 m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString());
310 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, 310 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
311 ReceivedData, null); 311 ReceivedData, null);
312 } 312 }
313 } 313 }
314 } 314 }
@@ -332,31 +332,31 @@ namespace OpenSim.Region.ClientStack
332 //Slave regions don't accept new clients 332 //Slave regions don't accept new clients
333 if(m_localScene.Region_Status != RegionStatus.SlaveScene) 333 if(m_localScene.Region_Status != RegionStatus.SlaveScene)
334 { 334 {
335 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; 335 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet;
336 lock (clientCircuits) 336 lock (clientCircuits)
337 { 337 {
338 if (!clientCircuits.ContainsKey(epSender)) 338 if (!clientCircuits.ContainsKey(epSender))
339 clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); 339 clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
340 else 340 else
341 m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); 341 m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
342 } 342 }
343 lock (clientCircuits_reverse) 343 lock (clientCircuits_reverse)
344 { 344 {
345 if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code)) 345 if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code))
346 clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender); 346 clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender);
347 else 347 else
348 m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); 348 m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
349 } 349 }
350 350
351 lock (proxyCircuits) 351 lock (proxyCircuits)
352 { 352 {
353 if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) 353 if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
354 proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy); 354 proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy);
355 else 355 else
356 m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); 356 m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
357 } 357 }
358 358
359 PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy); 359 PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy);
360 } 360 }
361 PacketPool.Instance.ReturnPacket(packet); 361 PacketPool.Instance.ReturnPacket(packet);
362 } 362 }
@@ -394,20 +394,20 @@ namespace OpenSim.Region.ClientStack
394 lock (clientCircuits_reverse) 394 lock (clientCircuits_reverse)
395 { 395 {
396 if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto)) 396 if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto))
397 { 397 {
398 //we found the endpoint so send the packet to it 398 //we found the endpoint so send the packet to it
399 if (proxyPortOffset != 0) 399 if (proxyPortOffset != 0)
400 { 400 {
401 //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString()); 401 //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString());
402 PacketPool.EncodeProxyMessage(buffer, ref size, sendto); 402 PacketPool.EncodeProxyMessage(buffer, ref size, sendto);
403 Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]); 403 Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]);
404 } 404 }
405 else 405 else
406 { 406 {
407 //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString()); 407 //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString());
408 Server.SendTo(buffer, size, flags, sendto); 408 Server.SendTo(buffer, size, flags, sendto);
409 } 409 }
410 } 410 }
411 } 411 }
412 } 412 }
413 413
@@ -421,7 +421,7 @@ namespace OpenSim.Region.ClientStack
421 clientCircuits.Remove(sendto); 421 clientCircuits.Remove(sendto);
422 422
423 clientCircuits_reverse.Remove(circuitcode); 423 clientCircuits_reverse.Remove(circuitcode);
424 proxyCircuits.Remove(circuitcode); 424 proxyCircuits.Remove(circuitcode);
425 } 425 }
426 } 426 }
427 } 427 }
@@ -435,7 +435,7 @@ namespace OpenSim.Region.ClientStack
435 useCircuit.CircuitCode.ID = circuit.AgentID; 435 useCircuit.CircuitCode.ID = circuit.AgentID;
436 useCircuit.CircuitCode.SessionID = circuit.SessionID; 436 useCircuit.CircuitCode.SessionID = circuit.SessionID;
437 437
438 lock (clientCircuits) 438 lock (clientCircuits)
439 { 439 {
440 if (!clientCircuits.ContainsKey(userEP)) 440 if (!clientCircuits.ContainsKey(userEP))
441 clientCircuits.Add(userEP, useCircuit.CircuitCode.Code); 441 clientCircuits.Add(userEP, useCircuit.CircuitCode.Code);
@@ -453,15 +453,15 @@ namespace OpenSim.Region.ClientStack
453 lock (proxyCircuits) 453 lock (proxyCircuits)
454 { 454 {
455 if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) 455 if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
456 { 456 {
457 proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); 457 proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP);
458 } 458 }
459 else 459 else
460 { 460 {
461 // re-set proxy endpoint 461 // re-set proxy endpoint
462 proxyCircuits.Remove(useCircuit.CircuitCode.Code); 462 proxyCircuits.Remove(useCircuit.CircuitCode.Code);
463 proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); 463 proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP);
464 } 464 }
465 } 465 }
466 466
467 PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP); 467 PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP);