diff options
author | Justin Clarke Casey | 2008-10-17 19:08:53 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-17 19:08:53 +0000 |
commit | 84492fee01d786cb28bed3a91148b1be9168a54a (patch) | |
tree | 1c5c042f3a641c8b242ba870acd55cbe78cc72f7 /OpenSim/Region/ClientStack/LindenUDP | |
parent | Fixed llDeleteSubList; the indices were swapped (Fixes Mantis#2399). (diff) | |
download | opensim-SC-84492fee01d786cb28bed3a91148b1be9168a54a.zip opensim-SC-84492fee01d786cb28bed3a91148b1be9168a54a.tar.gz opensim-SC-84492fee01d786cb28bed3a91148b1be9168a54a.tar.bz2 opensim-SC-84492fee01d786cb28bed3a91148b1be9168a54a.tar.xz |
* Temporarily resume creation of IPEndPoint on every call
* This widened what I think is an existing race condition where asynchronous recieves could potentially stomp on each other's end points (though this must occur very rarely, if at
all, in reality)
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 2a907cc..26a77e4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -176,10 +176,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
176 | protected virtual void OnReceivedData(IAsyncResult result) | 176 | protected virtual void OnReceivedData(IAsyncResult result) |
177 | { | 177 | { |
178 | Packet packet = null; | 178 | Packet packet = null; |
179 | |||
180 | int numBytes = 1; | 179 | int numBytes = 1; |
181 | |||
182 | bool ok = false; | 180 | bool ok = false; |
181 | reusedEpSender = new IPEndPoint(IPAddress.Any, 0); | ||
183 | 182 | ||
184 | try | 183 | try |
185 | { | 184 | { |
@@ -451,9 +450,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
451 | { | 450 | { |
452 | // find the endpoint for this circuit | 451 | // find the endpoint for this circuit |
453 | EndPoint sendto; | 452 | EndPoint sendto; |
454 | try { | 453 | try |
454 | { | ||
455 | sendto = (EndPoint)clientCircuits_reverse[circuitcode]; | 455 | sendto = (EndPoint)clientCircuits_reverse[circuitcode]; |
456 | } catch { | 456 | } |
457 | catch | ||
458 | { | ||
457 | // Exceptions here mean there is no circuit | 459 | // Exceptions here mean there is no circuit |
458 | m_log.Warn("[CLIENT]: Circuit not found, not sending packet"); | 460 | m_log.Warn("[CLIENT]: Circuit not found, not sending packet"); |
459 | return; | 461 | return; |
@@ -525,7 +527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
525 | if (!clientCircuits.ContainsKey(userEP)) | 527 | if (!clientCircuits.ContainsKey(userEP)) |
526 | clientCircuits.Add(userEP, useCircuit.CircuitCode.Code); | 528 | clientCircuits.Add(userEP, useCircuit.CircuitCode.Code); |
527 | else | 529 | else |
528 | m_log.Error("[CLIENT]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code + ". NOT adding."); | 530 | m_log.Error("[CLIENT]: clientCircuits already contains entry for user " + useCircuit.CircuitCode.Code + ". NOT adding."); |
529 | } | 531 | } |
530 | 532 | ||
531 | // This data structure is synchronized, so we don't need the lock | 533 | // This data structure is synchronized, so we don't need the lock |