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.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 4e3cfa5..4382005 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -356,7 +356,9 @@ namespace OpenSim.Services.Connectors.Simulation
356 356
357 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) 357 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
358 { 358 {
359 IPEndPoint ext = destination.ExternalEndPoint;
359 agent = null; 360 agent = null;
361 if (ext == null) return false;
360 // Eventually, we want to use a caps url instead of the agentID 362 // Eventually, we want to use a caps url instead of the agentID
361 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 363 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
362 364
@@ -505,12 +507,14 @@ namespace OpenSim.Services.Connectors.Simulation
505 return true; 507 return true;
506 } 508 }
507 509
508 public bool CloseAgent(GridRegion destination, UUID id) 510 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
509 { 511 {
510 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 512 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
511 513
512 WebRequest request = WebRequest.Create(uri); 514 WebRequest request = WebRequest.Create(uri);
513 request.Method = "DELETE"; 515 request.Method = "DELETE";
516 if (ChildOnly)
517 request.Method += "CHILD";
514 request.Timeout = 10000; 518 request.Timeout = 10000;
515 519
516 StreamReader sr = null; 520 StreamReader sr = null;
@@ -543,6 +547,16 @@ namespace OpenSim.Services.Connectors.Simulation
543 return true; 547 return true;
544 } 548 }
545 549
550 public bool CloseChildAgent(GridRegion destination, UUID id)
551 {
552 return CloseAgent(destination, id, true);
553 }
554
555 public bool CloseAgent(GridRegion destination, UUID id)
556 {
557 return CloseAgent(destination, id, false);
558 }
559
546 #endregion Agents 560 #endregion Agents
547 561
548 #region Objects 562 #region Objects
@@ -554,6 +568,8 @@ namespace OpenSim.Services.Connectors.Simulation
554 568
555 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 569 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
556 { 570 {
571 IPEndPoint ext = destination.ExternalEndPoint;
572 if (ext == null) return false;
557 string uri 573 string uri
558 = destination.ServerURI + ObjectPath() + sog.UUID + "/"; 574 = destination.ServerURI + ObjectPath() + sog.UUID + "/";
559 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 575 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);