mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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.
This commit is contained in:
@@ -348,9 +348,11 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
|
||||
public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
|
||||
{
|
||||
IPEndPoint ext = destination.ExternalEndPoint;
|
||||
agent = null;
|
||||
if (ext == null) return false;
|
||||
// Eventually, we want to use a caps url instead of the agentID
|
||||
string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
||||
string uri = "http://" + ext.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
||||
//Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
|
||||
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
|
||||
@@ -514,8 +516,10 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
|
||||
public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
|
||||
{
|
||||
IPEndPoint ext = destination.ExternalEndPoint;
|
||||
if (ext == null) return false;
|
||||
string uri
|
||||
= "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/";
|
||||
= "http://" + ext.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/";
|
||||
//m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
|
||||
|
||||
WebRequest ObjectCreateRequest = WebRequest.Create(uri);
|
||||
|
||||
Reference in New Issue
Block a user