diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | 6 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 024b42d..f5b5982 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -86,8 +86,8 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
86 | paramList.Add(hash); | 86 | paramList.Add(hash); |
87 | 87 | ||
88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); | 88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); |
89 | string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"; | 89 | string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" ); |
90 | //m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); | 90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); |
91 | XmlRpcResponse response = null; | 91 | XmlRpcResponse response = null; |
92 | try | 92 | try |
93 | { | 93 | { |
@@ -188,7 +188,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
188 | paramList.Add(hash); | 188 | paramList.Add(hash); |
189 | 189 | ||
190 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); | 190 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); |
191 | string uri = "http://" + gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"; | 191 | string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"); |
192 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); | 192 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); |
193 | XmlRpcResponse response = null; | 193 | XmlRpcResponse response = null; |
194 | try | 194 | try |
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 4501937..7fa086a 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -51,15 +51,16 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
51 | MethodBase.GetCurrentMethod().DeclaringType); | 51 | MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | string m_ServerURL; | 53 | string m_ServerURL; |
54 | Uri m_Uri; | ||
55 | public UserAgentServiceConnector(string url) | 54 | public UserAgentServiceConnector(string url) |
56 | { | 55 | { |
57 | m_ServerURL = url; | 56 | m_ServerURL = url; |
57 | // Doing this here, because XML-RPC or mono have some strong ideas about | ||
58 | // caching DNS translations. | ||
58 | try | 59 | try |
59 | { | 60 | { |
60 | m_Uri = new Uri(m_ServerURL); | 61 | Uri m_Uri = new Uri(m_ServerURL); |
61 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); | 62 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); |
62 | m_ServerURL = "http://" + ip.ToString() + ":" + m_Uri.Port; | 63 | m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString()); ; |
63 | } | 64 | } |
64 | catch (Exception e) | 65 | catch (Exception e) |
65 | { | 66 | { |