diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 35 | ||||
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 6 |
2 files changed, 27 insertions, 14 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 5028206..6ed8a3f 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -51,20 +51,31 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
51 | MethodBase.GetCurrentMethod().DeclaringType); | 51 | MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | string m_ServerURL; | 53 | string m_ServerURL; |
54 | public UserAgentServiceConnector(string url) | 54 | |
55 | public UserAgentServiceConnector(string url) : this(url, true) | ||
56 | { | ||
57 | } | ||
58 | |||
59 | public UserAgentServiceConnector(string url, bool dnsLookup) | ||
55 | { | 60 | { |
56 | m_ServerURL = url; | 61 | m_ServerURL = url; |
57 | // Doing this here, because XML-RPC or mono have some strong ideas about | 62 | |
58 | // caching DNS translations. | 63 | if (dnsLookup) |
59 | try | ||
60 | { | ||
61 | Uri m_Uri = new Uri(m_ServerURL); | ||
62 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); | ||
63 | m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString()); ; | ||
64 | } | ||
65 | catch (Exception e) | ||
66 | { | 64 | { |
67 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message); | 65 | // Doing this here, because XML-RPC or mono have some strong ideas about |
66 | // caching DNS translations. | ||
67 | try | ||
68 | { | ||
69 | Uri m_Uri = new Uri(m_ServerURL); | ||
70 | IPAddress ip = Util.GetHostFromDNS(m_Uri.Host); | ||
71 | m_ServerURL = m_ServerURL.Replace(m_Uri.Host, ip.ToString()); | ||
72 | if (!m_ServerURL.EndsWith("/")) | ||
73 | m_ServerURL += "/"; | ||
74 | } | ||
75 | catch (Exception e) | ||
76 | { | ||
77 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message); | ||
78 | } | ||
68 | } | 79 | } |
69 | m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0} ({1})", url, m_ServerURL); | 80 | m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0} ({1})", url, m_ServerURL); |
70 | } | 81 | } |
@@ -423,7 +434,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
423 | XmlRpcResponse response = null; | 434 | XmlRpcResponse response = null; |
424 | try | 435 | try |
425 | { | 436 | { |
426 | response = request.Send(m_ServerURL, 10000); | 437 | response = request.Send(m_ServerURL, 4000); |
427 | } | 438 | } |
428 | catch (Exception e) | 439 | catch (Exception e) |
429 | { | 440 | { |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 41d5a88..ac53583 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -197,9 +197,11 @@ namespace OpenSim.Services.HypergridService | |||
197 | agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); | 197 | agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); |
198 | 198 | ||
199 | // restore the old travel info | 199 | // restore the old travel info |
200 | if(reason != "Logins Disabled") | 200 | lock (m_TravelingAgents) |
201 | { | 201 | { |
202 | lock (m_TravelingAgents) | 202 | if (old == null) |
203 | m_TravelingAgents.Remove(agentCircuit.SessionID); | ||
204 | else | ||
203 | m_TravelingAgents[agentCircuit.SessionID] = old; | 205 | m_TravelingAgents[agentCircuit.SessionID] = old; |
204 | } | 206 | } |
205 | 207 | ||