diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 71 |
1 files changed, 13 insertions, 58 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index da77719..0e74073 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -272,41 +272,6 @@ namespace OpenSim.Services.Connectors.Simulation | |||
272 | return false; | 272 | return false; |
273 | } | 273 | } |
274 | 274 | ||
275 | /// <summary> | ||
276 | /// Not sure what sequence causes this function to be invoked. The only calling | ||
277 | /// path is through the GET method | ||
278 | /// </summary> | ||
279 | public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) | ||
280 | { | ||
281 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: RetrieveAgent start"); | ||
282 | |||
283 | agent = null; | ||
284 | |||
285 | // Eventually, we want to use a caps url instead of the agentID | ||
286 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | ||
287 | |||
288 | try | ||
289 | { | ||
290 | OSDMap result = WebUtil.GetFromService(uri, 10000); | ||
291 | if (result["Success"].AsBoolean()) | ||
292 | { | ||
293 | // OSDMap args = Util.GetOSDMap(result["_RawResult"].AsString()); | ||
294 | OSDMap args = (OSDMap)result["_Result"]; | ||
295 | if (args != null) | ||
296 | { | ||
297 | agent = new CompleteAgentData(); | ||
298 | agent.Unpack(args, null); | ||
299 | return true; | ||
300 | } | ||
301 | } | ||
302 | } | ||
303 | catch (Exception e) | ||
304 | { | ||
305 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: UpdateAgent failed with exception: " + e.ToString()); | ||
306 | } | ||
307 | |||
308 | return false; | ||
309 | } | ||
310 | 275 | ||
311 | /// <summary> | 276 | /// <summary> |
312 | /// </summary> | 277 | /// </summary> |
@@ -405,35 +370,25 @@ namespace OpenSim.Services.Connectors.Simulation | |||
405 | return true; | 370 | return true; |
406 | } | 371 | } |
407 | 372 | ||
408 | private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) | 373 | /// <summary> |
374 | /// </summary> | ||
375 | public bool CloseAgent(GridRegion destination, UUID id, string auth_code) | ||
409 | { | 376 | { |
410 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); | 377 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/?auth=" + auth_code; |
411 | Util.FireAndForget(x => { | 378 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent {0}", uri); |
412 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | ||
413 | 379 | ||
414 | try | 380 | try |
415 | { | 381 | { |
416 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); | 382 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); |
417 | } | 383 | } |
418 | catch (Exception e) | 384 | catch (Exception e) |
419 | { | 385 | { |
420 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); | 386 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); |
421 | } | 387 | } |
422 | }); | ||
423 | 388 | ||
424 | return true; | 389 | return true; |
425 | } | 390 | } |
426 | 391 | ||
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 | |||
437 | #endregion Agents | 392 | #endregion Agents |
438 | 393 | ||
439 | #region Objects | 394 | #region Objects |