diff options
Diffstat (limited to '')
-rw-r--r-- | ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs index e65e7e5..a1476fa 100644 --- a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs +++ b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | |||
@@ -396,36 +396,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
396 | //m_log.ErrorFormat("[PROXY] Got message from {0} in thread {1}, size {2}", senderEP, sd.clientEP, numBytes); | 396 | //m_log.ErrorFormat("[PROXY] Got message from {0} in thread {1}, size {2}", senderEP, sd.clientEP, numBytes); |
397 | EndPoint client = proxy_map.GetClient(senderEP); | 397 | EndPoint client = proxy_map.GetClient(senderEP); |
398 | 398 | ||
399 | if (client != null) | 399 | if (client == null) |
400 | { | ||
401 | try | ||
402 | { | ||
403 | client = ProxyCodec.DecodeProxyMessage(buffer, ref numBytes); | ||
404 | try | ||
405 | { | ||
406 | // This message comes from a region object, forward it to the its client | ||
407 | sd.server.SendTo(buffer, numBytes, SocketFlags.None, client); | ||
408 | //m_log.InfoFormat("[PROXY] Sending region message from {0} to {1}, size {2}", senderEP, client, numBytes); | ||
409 | } | ||
410 | catch (Exception e) | ||
411 | { | ||
412 | OpenPort(sd); // reopen the port just in case | ||
413 | m_log.ErrorFormat("[PROXY] Failed sending region message from {0} to {1}", senderEP, client); | ||
414 | m_log.Error("[PROXY]" + e.Message); | ||
415 | m_log.Error("[PROXY]" + e.StackTrace); | ||
416 | return; | ||
417 | } | ||
418 | } | ||
419 | catch (Exception e) | ||
420 | { | ||
421 | OpenPort(sd); // reopen the port just in case | ||
422 | m_log.ErrorFormat("[PROXY] Failed decoding region message from {0}", senderEP); | ||
423 | m_log.Error("[PROXY]" + e.Message); | ||
424 | m_log.Error("[PROXY]" + e.StackTrace); | ||
425 | return; | ||
426 | } | ||
427 | } | ||
428 | else | ||
429 | { | 400 | { |
430 | // This message comes from a client object, forward it to the the region(s) | 401 | // This message comes from a client object, forward it to the the region(s) |
431 | ProxyCodec.EncodeProxyMessage(buffer, ref numBytes, senderEP); | 402 | ProxyCodec.EncodeProxyMessage(buffer, ref numBytes, senderEP); |
@@ -454,6 +425,35 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
454 | } | 425 | } |
455 | } | 426 | } |
456 | } | 427 | } |
428 | else | ||
429 | { | ||
430 | try | ||
431 | { | ||
432 | client = ProxyCodec.DecodeProxyMessage(buffer, ref numBytes); | ||
433 | try | ||
434 | { | ||
435 | // This message comes from a region object, forward it to the its client | ||
436 | sd.server.SendTo(buffer, numBytes, SocketFlags.None, client); | ||
437 | //m_log.InfoFormat("[PROXY] Sending region message from {0} to {1}, size {2}", senderEP, client, numBytes); | ||
438 | } | ||
439 | catch (Exception e) | ||
440 | { | ||
441 | OpenPort(sd); // reopen the port just in case | ||
442 | m_log.ErrorFormat("[PROXY] Failed sending region message from {0} to {1}", senderEP, client); | ||
443 | m_log.Error("[PROXY]" + e.Message); | ||
444 | m_log.Error("[PROXY]" + e.StackTrace); | ||
445 | return; | ||
446 | } | ||
447 | } | ||
448 | catch (Exception e) | ||
449 | { | ||
450 | OpenPort(sd); // reopen the port just in case | ||
451 | m_log.ErrorFormat("[PROXY] Failed decoding region message from {0}", senderEP); | ||
452 | m_log.Error("[PROXY]" + e.Message); | ||
453 | m_log.Error("[PROXY]" + e.StackTrace); | ||
454 | return; | ||
455 | } | ||
456 | } | ||
457 | } | 457 | } |
458 | 458 | ||
459 | #region Nested type: ProxyMap | 459 | #region Nested type: ProxyMap |