From e7c2674dec2c9ea36313b51e7bc604753e16f24f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 26 May 2017 21:26:51 +0100 Subject: cleanup (grid)region info endpoint; add log to try to find some xml decode issues --- OpenSim/Services/Interfaces/IGridService.cs | 45 +---------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 8068ff5..ead5d3c 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -462,50 +462,7 @@ namespace OpenSim.Services.Interfaces /// public IPEndPoint ExternalEndPoint { - get - { - IPAddress ia = null; - // If it is already an IP, don't resolve it - just return directly - // we should not need this - if (IPAddress.TryParse(m_externalHostName, out ia)) - { - if (ia.Equals(IPAddress.Any) || ia.Equals(IPAddress.IPv6Any)) - return null; - return new IPEndPoint(ia, m_internalEndPoint.Port); - } - - // Reset for next check - ia = null; - try - { - foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) - { - if (ia == null) - ia = Adr; - - if (Adr.AddressFamily == AddressFamily.InterNetwork) - { - ia = Adr; - break; - } - } - } - catch // (SocketException e) - { - /*throw new Exception( - "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + - e + "' attached to this exception", e);*/ - // Don't throw a fatal exception here, instead, return Null and handle it in the caller. - // Reason is, on systems such as OSgrid it has occured that known hostnames stop - // resolving and thus make surrounding regions crash out with this exception. - return null; - } - - if(ia == null) - return null; - - return new IPEndPoint(ia, m_internalEndPoint.Port); - } + get { return Util.getEndPoint(m_externalHostName, m_internalEndPoint.Port); } } public string ExternalHostName -- cgit v1.1