aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs8
-rw-r--r--OpenSim/Framework/RegionInfo.cs11
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs23
4 files changed, 38 insertions, 10 deletions
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
index daa43ac..9e34672 100644
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ b/OpenSim/Framework/Communications/IGridServices.cs
@@ -41,7 +41,15 @@ namespace OpenSim.Framework.Communications
41 RegionCommsListener RegisterRegion(RegionInfo regionInfos); 41 RegionCommsListener RegisterRegion(RegionInfo regionInfos);
42 42
43 bool DeregisterRegion(RegionInfo regionInfo); 43 bool DeregisterRegion(RegionInfo regionInfo);
44
45 /// <summary>
46 /// Get information about the regions neighbouring the given co-ordinates.
47 /// </summary>
48 /// <param name="x"></param>
49 /// <param name="y"></param>
50 /// <returns></returns>
44 List<SimpleRegionInfo> RequestNeighbours(uint x, uint y); 51 List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
52
45 RegionInfo RequestNeighbourInfo(ulong regionHandle); 53 RegionInfo RequestNeighbourInfo(ulong regionHandle);
46 RegionInfo RequestClosestRegion(string regionName); 54 RegionInfo RequestClosestRegion(string regionName);
47 Dictionary<string, string> GetGridSettings(); 55 Dictionary<string, string> GetGridSettings();
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 76ae1ba..b5d6869 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -38,6 +38,9 @@ namespace OpenSim.Framework
38 [Serializable] 38 [Serializable]
39 public class SimpleRegionInfo 39 public class SimpleRegionInfo
40 { 40 {
41// private static readonly log4net.ILog m_log
42// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
41 public SimpleRegionInfo() 44 public SimpleRegionInfo()
42 { 45 {
43 } 46 }
@@ -100,6 +103,11 @@ namespace OpenSim.Framework
100 103
101 public string RemotingAddress; 104 public string RemotingAddress;
102 105
106 /// <value>
107 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
108 ///
109 /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method?
110 /// </value>
103 public IPEndPoint ExternalEndPoint 111 public IPEndPoint ExternalEndPoint
104 { 112 {
105 get 113 get
@@ -114,8 +122,7 @@ namespace OpenSim.Framework
114 122
115 // Reset for next check 123 // Reset for next check
116 ia = null; 124 ia = null;
117 125
118 // New method favors IPv4
119 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) 126 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
120 { 127 {
121 if (ia == null) 128 if (ia == null)
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index f1542f5..fa1db15 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -206,11 +206,7 @@ namespace OpenSim.Region.Communications.OGS1
206 return returnGridSettings; 206 return returnGridSettings;
207 } 207 }
208 208
209 /// <summary> 209 // see IGridServices
210 ///
211 /// </summary>
212 /// <param name="regionInfo"></param>
213 /// <returns></returns>
214 public List<SimpleRegionInfo> RequestNeighbours(uint x, uint y) 210 public List<SimpleRegionInfo> RequestNeighbours(uint x, uint y)
215 { 211 {
216 Hashtable respData = MapBlockQuery((int) x - 1, (int) y - 1, (int) x + 1, (int) y + 1); 212 Hashtable respData = MapBlockQuery((int) x - 1, (int) y - 1, (int) x + 1, (int) y + 1);
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index d9c34e4..2089f07 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -278,9 +278,26 @@ namespace OpenSim.Region.Environment.Scenes
278 agent.child = true; 278 agent.child = true;
279 279
280 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 280 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
281 d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, 281
282 InformClientOfNeighbourCompleted, 282 try
283 d); 283 {
284 d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint,
285 InformClientOfNeighbourCompleted,
286 d);
287 }
288 catch (Exception e)
289 {
290 m_log.ErrorFormat(
291 "[REGIONINFO]: Could not resolve external hostname {0} for region {1} ({2}, {3})",
292 neighbours[i].ExternalHostName,
293 neighbours[i].RegionHandle,
294 neighbours[i].RegionLocX,
295 neighbours[i].RegionLocY);
296
297 // FIXME: Okay, even though we've failed, we're still going to throw the exception on,
298 // since I don't know what will happen if we just let the client continue
299 throw e;
300 }
284 } 301 }
285 } 302 }
286 } 303 }