aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs22
1 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 2b96b96..9e30044 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -377,9 +377,11 @@ namespace OpenSim.Services.Connectors.Simulation
377 377
378 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) 378 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
379 { 379 {
380 IPEndPoint ext = destination.ExternalEndPoint;
380 agent = null; 381 agent = null;
382 if (ext == null) return false;
381 // Eventually, we want to use a caps url instead of the agentID 383 // Eventually, we want to use a caps url instead of the agentID
382 string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 384 string uri = "http://" + ext.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
383 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri); 385 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
384 386
385 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 387 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
@@ -471,7 +473,7 @@ namespace OpenSim.Services.Connectors.Simulation
471 return true; 473 return true;
472 } 474 }
473 475
474 public bool CloseAgent(GridRegion destination, UUID id) 476 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
475 { 477 {
476 string uri = string.Empty; 478 string uri = string.Empty;
477 try 479 try
@@ -488,6 +490,8 @@ namespace OpenSim.Services.Connectors.Simulation
488 490
489 WebRequest request = WebRequest.Create(uri); 491 WebRequest request = WebRequest.Create(uri);
490 request.Method = "DELETE"; 492 request.Method = "DELETE";
493 if (ChildOnly)
494 request.Method += "CHILD";
491 request.Timeout = 10000; 495 request.Timeout = 10000;
492 496
493 StreamReader sr = null; 497 StreamReader sr = null;
@@ -520,6 +524,16 @@ namespace OpenSim.Services.Connectors.Simulation
520 return true; 524 return true;
521 } 525 }
522 526
527 public bool CloseChildAgent(GridRegion destination, UUID id)
528 {
529 return CloseAgent(destination, id, true);
530 }
531
532 public bool CloseAgent(GridRegion destination, UUID id)
533 {
534 return CloseAgent(destination, id, false);
535 }
536
523 #endregion Agents 537 #endregion Agents
524 538
525 #region Objects 539 #region Objects
@@ -531,8 +545,10 @@ namespace OpenSim.Services.Connectors.Simulation
531 545
532 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 546 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
533 { 547 {
548 IPEndPoint ext = destination.ExternalEndPoint;
549 if (ext == null) return false;
534 string uri 550 string uri
535 = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; 551 = "http://" + ext.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/";
536 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 552 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
537 553
538 WebRequest ObjectCreateRequest = WebRequest.Create(uri); 554 WebRequest ObjectCreateRequest = WebRequest.Create(uri);