From 1c040d8c1ed5ee1ba1e80aa1d248a9b06d1790a5 Mon Sep 17 00:00:00 2001
From: Tom Grimshaw
Date: Tue, 18 May 2010 03:24:43 -0700
Subject: Fix to the scenario where we send an agent to a neighbouring sim (via
teleport), then tell our neighbours to close the agents.. thereby
disconnecting the user. Added a new CloseChildAgent method in lieu of
CloseAgent. This has been a long standing problem - with any luck this will
cure it.
---
.../Connectors/Simulation/SimulationServiceConnector.cs | 14 +++++++++++++-
OpenSim/Services/Interfaces/ISimulationService.cs | 8 ++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index ff0dd7e..8e0063b 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -442,7 +442,7 @@ namespace OpenSim.Services.Connectors.Simulation
return true;
}
- public bool CloseAgent(GridRegion destination, UUID id)
+ private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
{
string uri = string.Empty;
try
@@ -459,6 +459,8 @@ namespace OpenSim.Services.Connectors.Simulation
WebRequest request = WebRequest.Create(uri);
request.Method = "DELETE";
+ if (ChildOnly)
+ request.Method += "CHILD";
request.Timeout = 10000;
StreamReader sr = null;
@@ -491,6 +493,16 @@ namespace OpenSim.Services.Connectors.Simulation
return true;
}
+ public bool CloseChildAgent(GridRegion destination, UUID id)
+ {
+ return CloseAgent(destination, id, true);
+ }
+
+ public bool CloseAgent(GridRegion destination, UUID id)
+ {
+ return CloseAgent(destination, id, false);
+ }
+
#endregion Agents
#region Objects
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 67d7cbe..33d6fde 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -71,6 +71,14 @@ namespace OpenSim.Services.Interfaces
bool ReleaseAgent(UUID originRegion, UUID id, string uri);
///
+ /// Close child agent.
+ ///
+ ///
+ ///
+ ///
+ bool CloseChildAgent(GridRegion destination, UUID id);
+
+ ///
/// Close agent.
///
///
--
cgit v1.1