aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs35
2 files changed, 23 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index b9d6719..b8342ef 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -278,7 +278,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
278 List<string> ids = new List<string>(); 278 List<string> ids = new List<string>();
279 foreach (FriendInfo f in kvp.Value) 279 foreach (FriendInfo f in kvp.Value)
280 ids.Add(f.Friend); 280 ids.Add(f.Friend);
281 UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key); 281 UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key, false);
282 List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online); 282 List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online);
283 // need to debug this here 283 // need to debug this here
284 if (online) 284 if (online)
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index b7e09e8..2a5fb40 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -51,22 +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 if (!m_ServerURL.EndsWith("/"))
65 m_ServerURL += "/";
66 }
67 catch (Exception e)
68 { 64 {
69 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 }
70 } 79 }
71 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);
72 } 81 }