diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 95c4f87..e1c2243 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -86,6 +86,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
86 | reason = String.Empty; | 86 | reason = String.Empty; |
87 | if (destination == null) | 87 | if (destination == null) |
88 | { | 88 | { |
89 | reason = "Destination not found"; | ||
89 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); | 90 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); |
90 | return false; | 91 | return false; |
91 | } | 92 | } |
@@ -359,6 +360,10 @@ namespace OpenSim.Services.Connectors.Simulation | |||
359 | return false; | 360 | return false; |
360 | } | 361 | } |
361 | 362 | ||
363 | OSDMap resp = (OSDMap)result["_Result"]; | ||
364 | success = resp["success"].AsBoolean(); | ||
365 | reason = resp["reason"].AsString(); | ||
366 | |||
362 | return success; | 367 | return success; |
363 | } | 368 | } |
364 | catch (Exception e) | 369 | catch (Exception e) |
@@ -387,9 +392,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
387 | return true; | 392 | return true; |
388 | } | 393 | } |
389 | 394 | ||
390 | /// <summary> | 395 | private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) |
391 | /// </summary> | ||
392 | public bool CloseAgent(GridRegion destination, UUID id) | ||
393 | { | 396 | { |
394 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); | 397 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); |
395 | 398 | ||
@@ -407,6 +410,16 @@ namespace OpenSim.Services.Connectors.Simulation | |||
407 | return true; | 410 | return true; |
408 | } | 411 | } |
409 | 412 | ||
413 | public bool CloseChildAgent(GridRegion destination, UUID id) | ||
414 | { | ||
415 | return CloseAgent(destination, id, true); | ||
416 | } | ||
417 | |||
418 | public bool CloseAgent(GridRegion destination, UUID id) | ||
419 | { | ||
420 | return CloseAgent(destination, id, false); | ||
421 | } | ||
422 | |||
410 | #endregion Agents | 423 | #endregion Agents |
411 | 424 | ||
412 | #region Objects | 425 | #region Objects |
@@ -444,11 +457,14 @@ namespace OpenSim.Services.Connectors.Simulation | |||
444 | args["destination_name"] = OSD.FromString(destination.RegionName); | 457 | args["destination_name"] = OSD.FromString(destination.RegionName); |
445 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 458 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); |
446 | 459 | ||
447 | WebUtil.PostToService(uri, args, 40000); | 460 | OSDMap response = WebUtil.PostToService(uri, args, 40000); |
461 | if (response["Success"] == "False") | ||
462 | return false; | ||
448 | } | 463 | } |
449 | catch (Exception e) | 464 | catch (Exception e) |
450 | { | 465 | { |
451 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString()); | 466 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString()); |
467 | return false; | ||
452 | } | 468 | } |
453 | 469 | ||
454 | return true; | 470 | return true; |