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