From 83da58226114ddda41c984fed8298908ed012c8b Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 23 Jul 2015 14:50:50 +0300 Subject: Removed unused code related to DNS lookups --- OpenSim/Framework/Util.cs | 36 ---------------------- .../Simulation/RemoteSimulationConnector.cs | 2 -- 2 files changed, 38 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 2d0b280..4e75a5c 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -805,16 +805,6 @@ namespace OpenSim.Framework } /// - /// Converts a URL to a IPAddress - /// - /// URL Standard Format - /// A resolved IP Address - public static IPAddress GetHostFromURL(string url) - { - return GetHostFromDNS(url.Split(new char[] {'/', ':'})[3]); - } - - /// /// Returns a IP address from a specified DNS, favouring IPv4 addresses. /// /// DNS Hostname @@ -1802,32 +1792,6 @@ namespace OpenSim.Framework return found.ToArray(); } - public static string ServerURI(string uri) - { - if (uri == string.Empty) - return string.Empty; - - // Get rid of eventual slashes at the end - uri = uri.TrimEnd('/'); - - IPAddress ipaddr1 = null; - string port1 = ""; - try - { - ipaddr1 = Util.GetHostFromURL(uri); - } - catch { } - - try - { - port1 = uri.Split(new char[] { ':' })[2]; - } - catch { } - - // We tried our best to convert the domain names to IP addresses - return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri; - } - /// /// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary. /// diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 6ecc327..3a32d77 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -60,7 +60,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation protected SimulationServiceConnector m_remoteConnector; protected bool m_safemode; - protected IPAddress m_thisIP; #region Region Module interface @@ -141,7 +140,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { m_aScene = scene; //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); - m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); } #endregion -- cgit v1.1