Removed unused code related to DNS lookups

0.8.2-post-fixes
Oren Hurvitz 2015-07-23 14:50:50 +03:00
parent b94df58891
commit 83da582261
2 changed files with 0 additions and 38 deletions

View File

@ -804,16 +804,6 @@ namespace OpenSim.Framework
return output.ToString();
}
/// <summary>
/// Converts a URL to a IPAddress
/// </summary>
/// <param name="url">URL Standard Format</param>
/// <returns>A resolved IP Address</returns>
public static IPAddress GetHostFromURL(string url)
{
return GetHostFromDNS(url.Split(new char[] {'/', ':'})[3]);
}
/// <summary>
/// Returns a IP address from a specified DNS, favouring IPv4 addresses.
/// </summary>
@ -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;
}
/// <summary>
/// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary.
/// </summary>

View File

@ -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