diff options
author | Diva Canto | 2010-08-16 14:36:20 -0700 |
---|---|---|
committer | Diva Canto | 2010-08-16 14:38:50 -0700 |
commit | cf842dd79dfed0e61288b136ab0b4a8b8e4cc898 (patch) | |
tree | 0aa04488c4620a49f5e58799803bd234d3b9d614 | |
parent | Increased the timeout on AgentUpdate to 30 sec and improved error message to ... (diff) | |
download | opensim-SC_OLD-cf842dd79dfed0e61288b136ab0b4a8b8e4cc898.zip opensim-SC_OLD-cf842dd79dfed0e61288b136ab0b4a8b8e4cc898.tar.gz opensim-SC_OLD-cf842dd79dfed0e61288b136ab0b4a8b8e4cc898.tar.bz2 opensim-SC_OLD-cf842dd79dfed0e61288b136ab0b4a8b8e4cc898.tar.xz |
Fixes mantis #4954 for the xml-rpc calls of the UserAgentServiceConnector. Basically, let's not let the xml-rpc library do the DNS conversion...
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 96d2605..69dff3c 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -53,9 +53,20 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
53 | MethodBase.GetCurrentMethod().DeclaringType); | 53 | MethodBase.GetCurrentMethod().DeclaringType); |
54 | 54 | ||
55 | string m_ServerURL; | 55 | string m_ServerURL; |
56 | Uri m_Uri; | ||
56 | public UserAgentServiceConnector(string url) | 57 | public UserAgentServiceConnector(string url) |
57 | { | 58 | { |
58 | m_ServerURL = url; | 59 | m_ServerURL = url; |
60 | try | ||
61 | { | ||
62 | m_Uri = new Uri(m_ServerURL); | ||
63 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); | ||
64 | m_ServerURL = "http://" + ip.ToString() + ":" + m_Uri.Port; | ||
65 | } | ||
66 | catch (Exception e) | ||
67 | { | ||
68 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message); | ||
69 | } | ||
59 | } | 70 | } |
60 | 71 | ||
61 | public UserAgentServiceConnector(IConfigSource config) | 72 | public UserAgentServiceConnector(IConfigSource config) |
@@ -373,7 +384,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
373 | 384 | ||
374 | if (response.IsFault) | 385 | if (response.IsFault) |
375 | { | 386 | { |
376 | m_log.ErrorFormat("[HGrid]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); | 387 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); |
377 | reason = "XMLRPC Fault"; | 388 | reason = "XMLRPC Fault"; |
378 | return false; | 389 | return false; |
379 | } | 390 | } |
@@ -403,7 +414,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
403 | } | 414 | } |
404 | catch (Exception e) | 415 | catch (Exception e) |
405 | { | 416 | { |
406 | m_log.ErrorFormat("[HGrid]: Got exception on GetBoolResponse response."); | 417 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetBoolResponse response."); |
407 | if (hash.ContainsKey("result") && hash["result"] != null) | 418 | if (hash.ContainsKey("result") && hash["result"] != null) |
408 | m_log.ErrorFormat("Reply was ", (string)hash["result"]); | 419 | m_log.ErrorFormat("Reply was ", (string)hash["result"]); |
409 | reason = "Exception: " + e.Message; | 420 | reason = "Exception: " + e.Message; |