diff options
author | Jonathan Freedman | 2010-10-02 19:17:02 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2010-10-20 22:21:23 -0400 |
commit | 55974df14b6d64c1e1f9e386a3eacce3ba86dc98 (patch) | |
tree | 1695b00c4f523f2588b15051b0cfe919d14989e8 /OpenSim/Services/Connectors/Simulation | |
parent | Deleted verbose debug messages that are bringing sims to an halt. Increased t... (diff) | |
download | opensim-SC-55974df14b6d64c1e1f9e386a3eacce3ba86dc98.zip opensim-SC-55974df14b6d64c1e1f9e386a3eacce3ba86dc98.tar.gz opensim-SC-55974df14b6d64c1e1f9e386a3eacce3ba86dc98.tar.bz2 opensim-SC-55974df14b6d64c1e1f9e386a3eacce3ba86dc98.tar.xz |
* refactor refactor refactor ServerURI 4 lyfe
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index a5f748f..07839d3 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -104,24 +104,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
104 | return false; | 104 | return false; |
105 | } | 105 | } |
106 | 106 | ||
107 | string uri = string.Empty; | 107 | string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; |
108 | |||
109 | // HACK -- Simian grid make it work!!! | ||
110 | if (destination.ServerURI != null && destination.ServerURI != string.Empty && !destination.ServerURI.StartsWith("http:")) | ||
111 | uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; | ||
112 | else | ||
113 | { | ||
114 | try | ||
115 | { | ||
116 | uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/"; | ||
117 | } | ||
118 | catch (Exception e) | ||
119 | { | ||
120 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message); | ||
121 | reason = e.Message; | ||
122 | return false; | ||
123 | } | ||
124 | } | ||
125 | 108 | ||
126 | //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri); | 109 | //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri); |
127 | 110 | ||
@@ -277,16 +260,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
277 | private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) | 260 | private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) |
278 | { | 261 | { |
279 | // Eventually, we want to use a caps url instead of the agentID | 262 | // Eventually, we want to use a caps url instead of the agentID |
280 | string uri = string.Empty; | 263 | string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/"; |
281 | try | ||
282 | { | ||
283 | uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + cAgentData.AgentID + "/"; | ||
284 | } | ||
285 | catch (Exception e) | ||
286 | { | ||
287 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message); | ||
288 | return false; | ||
289 | } | ||
290 | //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri); | 264 | //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri); |
291 | 265 | ||
292 | HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); | 266 | HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); |
@@ -385,7 +359,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
385 | { | 359 | { |
386 | agent = null; | 360 | agent = null; |
387 | // Eventually, we want to use a caps url instead of the agentID | 361 | // Eventually, we want to use a caps url instead of the agentID |
388 | string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | 362 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; |
389 | //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri); | 363 | //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri); |
390 | 364 | ||
391 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); | 365 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); |
@@ -479,16 +453,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
479 | 453 | ||
480 | public bool CloseAgent(GridRegion destination, UUID id) | 454 | public bool CloseAgent(GridRegion destination, UUID id) |
481 | { | 455 | { |
482 | string uri = string.Empty; | 456 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; |
483 | try | ||
484 | { | ||
485 | uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | ||
486 | } | ||
487 | catch (Exception e) | ||
488 | { | ||
489 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message); | ||
490 | return false; | ||
491 | } | ||
492 | 457 | ||
493 | //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri); | 458 | //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri); |
494 | 459 | ||
@@ -538,7 +503,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
538 | public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) | 503 | public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) |
539 | { | 504 | { |
540 | string uri | 505 | string uri |
541 | = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; | 506 | = destination.ServerURI + ObjectPath() + sog.UUID + "/"; |
542 | //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); | 507 | //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); |
543 | 508 | ||
544 | WebRequest ObjectCreateRequest = WebRequest.Create(uri); | 509 | WebRequest ObjectCreateRequest = WebRequest.Create(uri); |