diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
index daa43acc49..9e34672462 100644
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ b/OpenSim/Framework/Communications/IGridServices.cs
@@ -41,7 +41,15 @@ namespace OpenSim.Framework.Communications
RegionCommsListener RegisterRegion(RegionInfo regionInfos);
bool DeregisterRegion(RegionInfo regionInfo);
+
+ ///
+ /// Get information about the regions neighbouring the given co-ordinates.
+ ///
+ ///
+ ///
+ ///
List RequestNeighbours(uint x, uint y);
+
RegionInfo RequestNeighbourInfo(ulong regionHandle);
RegionInfo RequestClosestRegion(string regionName);
Dictionary GetGridSettings();
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 76ae1ba864..b5d6869894 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -38,6 +38,9 @@ namespace OpenSim.Framework
[Serializable]
public class SimpleRegionInfo
{
+// private static readonly log4net.ILog m_log
+// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+
public SimpleRegionInfo()
{
}
@@ -100,6 +103,11 @@ namespace OpenSim.Framework
public string RemotingAddress;
+ ///
+ /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
+ ///
+ /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method?
+ ///
public IPEndPoint ExternalEndPoint
{
get
@@ -114,8 +122,7 @@ namespace OpenSim.Framework
// Reset for next check
ia = null;
-
- // New method favors IPv4
+
foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
{
if (ia == null)
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index f1542f5f23..fa1db15735 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -206,11 +206,7 @@ namespace OpenSim.Region.Communications.OGS1
return returnGridSettings;
}
- ///
- ///
- ///
- ///
- ///
+ // see IGridServices
public List RequestNeighbours(uint x, uint y)
{
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 d9c34e40d2..2089f07d77 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -278,9 +278,26 @@ namespace OpenSim.Region.Environment.Scenes
agent.child = true;
InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
- d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint,
- InformClientOfNeighbourCompleted,
- d);
+
+ try
+ {
+ d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint,
+ InformClientOfNeighbourCompleted,
+ d);
+ }
+ catch (Exception e)
+ {
+ m_log.ErrorFormat(
+ "[REGIONINFO]: Could not resolve external hostname {0} for region {1} ({2}, {3})",
+ neighbours[i].ExternalHostName,
+ neighbours[i].RegionHandle,
+ neighbours[i].RegionLocX,
+ neighbours[i].RegionLocY);
+
+ // FIXME: Okay, even though we've failed, we're still going to throw the exception on,
+ // since I don't know what will happen if we just let the client continue
+ throw e;
+ }
}
}
}