From 8f86de265c6187a61dde12fb122c1ae017b6ecf6 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 29 May 2017 05:22:21 +0100
Subject: some cleanup and assume Linux/mono DNS is just broken...

---
 .../Framework/EntityTransfer/EntityTransferModule.cs      | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 9959f6e..7214414 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -157,7 +157,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
                     m_idCache = new ExpiringCache<ulong, DateTime>();
                     m_bannedRegions.Add(pAgentID, m_idCache, TimeSpan.FromSeconds(newTime));
                 }
-                m_idCache.Add(pRegionHandle, DateTime.UtcNow + TimeSpan.FromSeconds(extendTime), TimeSpan.FromSeconds(extendTime));
+                m_idCache.Add(pRegionHandle, DateTime.UtcNow + TimeSpan.FromSeconds(extendTime), extendTime);
             }
 
             // Remove the agent from the region's banned list
@@ -1488,13 +1488,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
                                 Math.Max(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY));
 
             if (neighbourRegion == null)
-            {
-                failureReason = "no region found"; // debug -> to remove
                 return null;
-            }
+
             if (m_bannedRegionCache.IfBanned(neighbourRegion.RegionHandle, agentID))
             {
-                failureReason = "Access Denied";
+                failureReason = "Access Denied or Temporary not possible";
                 return null;
             }
 
@@ -1506,14 +1504,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
                                       pos.Z);
 
             string homeURI = scene.GetAgentHomeURI(agentID);
-
+           
             if (!scene.SimulationService.QueryAccess(
                     neighbourRegion, agentID, homeURI, false, newpos,
                     scene.GetFormatsOffered(), ctx, out failureReason))
             {
                 // remember the fail
                 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
-                failureReason = "Access Denied";
+                if(String.IsNullOrWhiteSpace(failureReason))
+                    failureReason = "Access Denied";
                 return null;
             }
 
@@ -2171,7 +2170,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
                                     InformClientOfNeighbourAsync(sp, cagents[count], neighbour, ipe, true);
                                 else
                                 {
-                                    m_log.DebugFormat("[ENTITY TRANSFER MODULE]: DNS for neighbour {0} lost", neighbour.ExternalHostName);
+                                    m_log.DebugFormat("[ENTITY TRANSFER MODULE]:  lost DNS resolution for neighbour {0}", neighbour.ExternalHostName);
                                 }
                                 count++;
                             }
-- 
cgit v1.1