diff options
-rw-r--r-- | OpenSim/Framework/Util.cs | 36 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | 2 |
2 files changed, 0 insertions, 38 deletions
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 | |||
805 | } | 805 | } |
806 | 806 | ||
807 | /// <summary> | 807 | /// <summary> |
808 | /// Converts a URL to a IPAddress | ||
809 | /// </summary> | ||
810 | /// <param name="url">URL Standard Format</param> | ||
811 | /// <returns>A resolved IP Address</returns> | ||
812 | public static IPAddress GetHostFromURL(string url) | ||
813 | { | ||
814 | return GetHostFromDNS(url.Split(new char[] {'/', ':'})[3]); | ||
815 | } | ||
816 | |||
817 | /// <summary> | ||
818 | /// Returns a IP address from a specified DNS, favouring IPv4 addresses. | 808 | /// Returns a IP address from a specified DNS, favouring IPv4 addresses. |
819 | /// </summary> | 809 | /// </summary> |
820 | /// <param name="dnsAddress">DNS Hostname</param> | 810 | /// <param name="dnsAddress">DNS Hostname</param> |
@@ -1802,32 +1792,6 @@ namespace OpenSim.Framework | |||
1802 | return found.ToArray(); | 1792 | return found.ToArray(); |
1803 | } | 1793 | } |
1804 | 1794 | ||
1805 | public static string ServerURI(string uri) | ||
1806 | { | ||
1807 | if (uri == string.Empty) | ||
1808 | return string.Empty; | ||
1809 | |||
1810 | // Get rid of eventual slashes at the end | ||
1811 | uri = uri.TrimEnd('/'); | ||
1812 | |||
1813 | IPAddress ipaddr1 = null; | ||
1814 | string port1 = ""; | ||
1815 | try | ||
1816 | { | ||
1817 | ipaddr1 = Util.GetHostFromURL(uri); | ||
1818 | } | ||
1819 | catch { } | ||
1820 | |||
1821 | try | ||
1822 | { | ||
1823 | port1 = uri.Split(new char[] { ':' })[2]; | ||
1824 | } | ||
1825 | catch { } | ||
1826 | |||
1827 | // We tried our best to convert the domain names to IP addresses | ||
1828 | return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri; | ||
1829 | } | ||
1830 | |||
1831 | /// <summary> | 1795 | /// <summary> |
1832 | /// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary. | 1796 | /// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary. |
1833 | /// </summary> | 1797 | /// </summary> |
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 | |||
60 | protected SimulationServiceConnector m_remoteConnector; | 60 | protected SimulationServiceConnector m_remoteConnector; |
61 | 61 | ||
62 | protected bool m_safemode; | 62 | protected bool m_safemode; |
63 | protected IPAddress m_thisIP; | ||
64 | 63 | ||
65 | #region Region Module interface | 64 | #region Region Module interface |
66 | 65 | ||
@@ -141,7 +140,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
141 | { | 140 | { |
142 | m_aScene = scene; | 141 | m_aScene = scene; |
143 | //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); | 142 | //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); |
144 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); | ||
145 | } | 143 | } |
146 | 144 | ||
147 | #endregion | 145 | #endregion |