aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Simulation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationDataService.cs5
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs45
2 files changed, 36 insertions, 14 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
index 504fcaf..96c02d9 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
@@ -164,6 +164,11 @@ namespace OpenSim.Services.Connectors
164 m_database.RemoveRegionEnvironmentSettings(regionUUID); 164 m_database.RemoveRegionEnvironmentSettings(regionUUID);
165 } 165 }
166 166
167 public UUID[] GetObjectIDs(UUID regionID)
168 {
169 return m_database.GetObjectIDs(regionID);
170 }
171
167 public void SaveExtra(UUID regionID, string name, string val) 172 public void SaveExtra(UUID regionID, string name, string val)
168 { 173 {
169 m_database.SaveExtra(regionID, name, val); 174 m_database.SaveExtra(regionID, name, val);
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index f51c809..da77719 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -102,6 +102,7 @@ namespace OpenSim.Services.Connectors.Simulation
102 102
103 if (destination == null) 103 if (destination == null)
104 { 104 {
105 reason = "Destination not found";
105 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); 106 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null");
106 return false; 107 return false;
107 } 108 }
@@ -372,6 +373,10 @@ namespace OpenSim.Services.Connectors.Simulation
372 return false; 373 return false;
373 } 374 }
374 375
376 OSDMap resp = (OSDMap)result["_Result"];
377 success = resp["success"].AsBoolean();
378 reason = resp["reason"].AsString();
379
375 return success; 380 return success;
376 } 381 }
377 catch (Exception e) 382 catch (Exception e)
@@ -400,26 +405,35 @@ namespace OpenSim.Services.Connectors.Simulation
400 return true; 405 return true;
401 } 406 }
402 407
403 /// <summary> 408 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
404 /// </summary>
405 public bool CloseAgent(GridRegion destination, UUID id)
406 { 409 {
407// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); 410// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start");
411 Util.FireAndForget(x => {
412 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
408 413
409 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 414 try
410 415 {
411 try 416 WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false);
412 { 417 }
413 WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); 418 catch (Exception e)
414 } 419 {
415 catch (Exception e) 420 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString());
416 { 421 }
417 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); 422 });
418 }
419 423
420 return true; 424 return true;
421 } 425 }
422 426
427 public bool CloseChildAgent(GridRegion destination, UUID id)
428 {
429 return CloseAgent(destination, id, true);
430 }
431
432 public bool CloseAgent(GridRegion destination, UUID id)
433 {
434 return CloseAgent(destination, id, false);
435 }
436
423 #endregion Agents 437 #endregion Agents
424 438
425 #region Objects 439 #region Objects
@@ -457,11 +471,14 @@ namespace OpenSim.Services.Connectors.Simulation
457 args["destination_name"] = OSD.FromString(destination.RegionName); 471 args["destination_name"] = OSD.FromString(destination.RegionName);
458 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 472 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
459 473
460 WebUtil.PostToService(uri, args, 40000); 474 OSDMap response = WebUtil.PostToService(uri, args, 40000);
475 if (response["Success"] == "False")
476 return false;
461 } 477 }
462 catch (Exception e) 478 catch (Exception e)
463 { 479 {
464 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString()); 480 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString());
481 return false;
465 } 482 }
466 483
467 return true; 484 return true;