aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Simulation
diff options
context:
space:
mode:
authorTom Grimshaw2010-05-29 01:03:59 -0700
committerTom Grimshaw2010-05-29 01:03:59 -0700
commit2f409116db570be77fc75df188a4044250dce226 (patch)
tree424980e50591e1d4b7d89fe88960e457b19c457d /OpenSim/Services/Connectors/Simulation
parentMerge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/car... (diff)
downloadopensim-SC_OLD-2f409116db570be77fc75df188a4044250dce226.zip
opensim-SC_OLD-2f409116db570be77fc75df188a4044250dce226.tar.gz
opensim-SC_OLD-2f409116db570be77fc75df188a4044250dce226.tar.bz2
opensim-SC_OLD-2f409116db570be77fc75df188a4044250dce226.tar.xz
Stop IGridService from throwing a fatal exception when an IPEndPoint cannot be resolved, and add some handlers to deal with this cleanly; a condition was observed on OSGrid where a neighbouring region with an invalid (unresolveable) hostname would prevent a region from starting. This is bad.
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 8e0063b..748faef 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -348,9 +348,11 @@ namespace OpenSim.Services.Connectors.Simulation
348 348
349 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) 349 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
350 { 350 {
351 IPEndPoint ext = destination.ExternalEndPoint;
351 agent = null; 352 agent = null;
353 if (ext == null) return false;
352 // Eventually, we want to use a caps url instead of the agentID 354 // Eventually, we want to use a caps url instead of the agentID
353 string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 355 string uri = "http://" + ext.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
354 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri); 356 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
355 357
356 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 358 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
@@ -514,8 +516,10 @@ namespace OpenSim.Services.Connectors.Simulation
514 516
515 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 517 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
516 { 518 {
519 IPEndPoint ext = destination.ExternalEndPoint;
520 if (ext == null) return false;
517 string uri 521 string uri
518 = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; 522 = "http://" + ext.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/";
519 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 523 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
520 524
521 WebRequest ObjectCreateRequest = WebRequest.Create(uri); 525 WebRequest ObjectCreateRequest = WebRequest.Create(uri);