Fixes mantis #4954 for the xml-rpc calls of the UserAgentServiceConnector. Basically, let's not let the xml-rpc library do the DNS conversion...
parent
69ad04cdf6
commit
d7824b86d9
|
@ -53,9 +53,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
string m_ServerURL;
|
string m_ServerURL;
|
||||||
|
Uri m_Uri;
|
||||||
public UserAgentServiceConnector(string url)
|
public UserAgentServiceConnector(string url)
|
||||||
{
|
{
|
||||||
m_ServerURL = url;
|
m_ServerURL = url;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_Uri = new Uri(m_ServerURL);
|
||||||
|
IPAddress ip = Util.GetHostFromDNS(m_Uri.Host);
|
||||||
|
m_ServerURL = "http://" + ip.ToString() + ":" + m_Uri.Port;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserAgentServiceConnector(IConfigSource config)
|
public UserAgentServiceConnector(IConfigSource config)
|
||||||
|
@ -373,7 +384,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
|
|
||||||
if (response.IsFault)
|
if (response.IsFault)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[HGrid]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
|
||||||
reason = "XMLRPC Fault";
|
reason = "XMLRPC Fault";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -403,7 +414,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[HGrid]: Got exception on GetBoolResponse response.");
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetBoolResponse response.");
|
||||||
if (hash.ContainsKey("result") && hash["result"] != null)
|
if (hash.ContainsKey("result") && hash["result"] != null)
|
||||||
m_log.ErrorFormat("Reply was ", (string)hash["result"]);
|
m_log.ErrorFormat("Reply was ", (string)hash["result"]);
|
||||||
reason = "Exception: " + e.Message;
|
reason = "Exception: " + e.Message;
|
||||||
|
|
Loading…
Reference in New Issue