aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs17
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs15
-rw-r--r--OpenSim/Region/Framework/Interfaces/IInterregionComms.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs23
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs2
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs23
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs14
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs8
8 files changed, 103 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index e32dbb3..329a259 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -290,6 +290,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
290 return false; 290 return false;
291 } 291 }
292 292
293 public bool CloseChildAgent(GridRegion destination, UUID id)
294 {
295 if (destination == null)
296 return false;
297
298 foreach (Scene s in m_sceneList)
299 {
300 if (s.RegionInfo.RegionID == destination.RegionID)
301 {
302 //m_log.Debug("[LOCAL COMMS]: Found region to SendCloseAgent");
303 return s.IncomingCloseChildAgent(id);
304 }
305 }
306 //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent");
307 return false;
308 }
309
293 /** 310 /**
294 * Object-related communications 311 * Object-related communications
295 */ 312 */
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 9e8454f..377c868 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -253,6 +253,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
253 return false; 253 return false;
254 } 254 }
255 255
256 public bool CloseChildAgent(GridRegion destination, UUID id)
257 {
258 if (destination == null)
259 return false;
260
261 // Try local first
262 if (m_localBackend.CloseChildAgent(destination, id))
263 return true;
264
265 // else do the remote thing
266 if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
267 return m_remoteConnector.CloseChildAgent(destination, id);
268
269 return false;
270 }
256 271
257 public bool CloseAgent(GridRegion destination, UUID id) 272 public bool CloseAgent(GridRegion destination, UUID id)
258 { 273 {
diff --git a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
index 2d6287f..67a500f 100644
--- a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
@@ -68,6 +68,14 @@ namespace OpenSim.Region.Framework.Interfaces
68 bool SendReleaseAgent(ulong regionHandle, UUID id, string uri); 68 bool SendReleaseAgent(ulong regionHandle, UUID id, string uri);
69 69
70 /// <summary> 70 /// <summary>
71 /// Close chid agent.
72 /// </summary>
73 /// <param name="regionHandle"></param>
74 /// <param name="id"></param>
75 /// <returns></returns>
76 bool SendCloseChildAgent(ulong regionHandle, UUID id);
77
78 /// <summary>
71 /// Close agent. 79 /// Close agent.
72 /// </summary> 80 /// </summary>
73 /// <param name="regionHandle"></param> 81 /// <param name="regionHandle"></param>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1b08c50..f331984 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3914,12 +3914,22 @@ namespace OpenSim.Region.Framework.Scenes
3914 return false; 3914 return false;
3915 } 3915 }
3916 3916
3917 public bool IncomingCloseAgent(UUID agentID)
3918 {
3919 return IncomingCloseAgent(agentID, false);
3920 }
3921
3922 public bool IncomingCloseChildAgent(UUID agentID)
3923 {
3924 return IncomingCloseAgent(agentID, true);
3925 }
3926
3917 /// <summary> 3927 /// <summary>
3918 /// Tell a single agent to disconnect from the region. 3928 /// Tell a single agent to disconnect from the region.
3919 /// </summary> 3929 /// </summary>
3920 /// <param name="regionHandle"></param>
3921 /// <param name="agentID"></param> 3930 /// <param name="agentID"></param>
3922 public bool IncomingCloseAgent(UUID agentID) 3931 /// <param name="childOnly"></param>
3932 public bool IncomingCloseAgent(UUID agentID, bool childOnly)
3923 { 3933 {
3924 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 3934 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
3925 3935
@@ -3931,7 +3941,7 @@ namespace OpenSim.Region.Framework.Scenes
3931 { 3941 {
3932 m_sceneGraph.removeUserCount(false); 3942 m_sceneGraph.removeUserCount(false);
3933 } 3943 }
3934 else 3944 else if (!childOnly)
3935 { 3945 {
3936 m_sceneGraph.removeUserCount(true); 3946 m_sceneGraph.removeUserCount(true);
3937 } 3947 }
@@ -3947,9 +3957,12 @@ namespace OpenSim.Region.Framework.Scenes
3947 } 3957 }
3948 else 3958 else
3949 presence.ControllingClient.SendShutdownConnectionNotice(); 3959 presence.ControllingClient.SendShutdownConnectionNotice();
3960 presence.ControllingClient.Close();
3961 }
3962 else if (!childOnly)
3963 {
3964 presence.ControllingClient.Close();
3950 } 3965 }
3951
3952 presence.ControllingClient.Close();
3953 return true; 3966 return true;
3954 } 3967 }
3955 3968
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 9d0e6f4..6309cd9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Framework.Scenes
281 uint x = 0, y = 0; 281 uint x = 0, y = 0;
282 Utils.LongToUInts(regionHandle, out x, out y); 282 Utils.LongToUInts(regionHandle, out x, out y);
283 GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); 283 GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
284 m_scene.SimulationService.CloseAgent(destination, agentID); 284 m_scene.SimulationService.CloseChildAgent(destination, agentID);
285 } 285 }
286 286
287 private void SendCloseChildAgentCompleted(IAsyncResult iar) 287 private void SendCloseChildAgentCompleted(IAsyncResult iar)
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index ab3250d..b648e12 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -108,6 +108,11 @@ namespace OpenSim.Server.Handlers.Simulation
108 DoAgentDelete(request, responsedata, agentID, action, regionID); 108 DoAgentDelete(request, responsedata, agentID, action, regionID);
109 return responsedata; 109 return responsedata;
110 } 110 }
111 else if (method.Equals("DELETECHILD"))
112 {
113 DoChildAgentDelete(request, responsedata, agentID, action, regionID);
114 return responsedata;
115 }
111 else 116 else
112 { 117 {
113 m_log.InfoFormat("[AGENT HANDLER]: method {0} not supported in agent message", method); 118 m_log.InfoFormat("[AGENT HANDLER]: method {0} not supported in agent message", method);
@@ -320,6 +325,24 @@ namespace OpenSim.Server.Handlers.Simulation
320 } 325 }
321 } 326 }
322 327
328 protected void DoChildAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID)
329 {
330 m_log.Debug(" >>> DoChildAgentDelete action:" + action + "; RegionID:" + regionID);
331
332 GridRegion destination = new GridRegion();
333 destination.RegionID = regionID;
334
335 if (action.Equals("release"))
336 ReleaseAgent(regionID, id);
337 else
338 m_SimulationService.CloseChildAgent(destination, id);
339
340 responsedata["int_response_code"] = HttpStatusCode.OK;
341 responsedata["str_response_string"] = "OpenSim agent " + id.ToString();
342
343 m_log.Debug("[AGENT HANDLER]: Child Agent Released/Deleted.");
344 }
345
323 protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID) 346 protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID)
324 { 347 {
325 m_log.Debug(" >>> DoDelete action:" + action + "; RegionID:" + regionID); 348 m_log.Debug(" >>> DoDelete action:" + action + "; RegionID:" + regionID);
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
442 return true; 442 return true;
443 } 443 }
444 444
445 public bool CloseAgent(GridRegion destination, UUID id) 445 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
446 { 446 {
447 string uri = string.Empty; 447 string uri = string.Empty;
448 try 448 try
@@ -459,6 +459,8 @@ namespace OpenSim.Services.Connectors.Simulation
459 459
460 WebRequest request = WebRequest.Create(uri); 460 WebRequest request = WebRequest.Create(uri);
461 request.Method = "DELETE"; 461 request.Method = "DELETE";
462 if (ChildOnly)
463 request.Method += "CHILD";
462 request.Timeout = 10000; 464 request.Timeout = 10000;
463 465
464 StreamReader sr = null; 466 StreamReader sr = null;
@@ -491,6 +493,16 @@ namespace OpenSim.Services.Connectors.Simulation
491 return true; 493 return true;
492 } 494 }
493 495
496 public bool CloseChildAgent(GridRegion destination, UUID id)
497 {
498 return CloseAgent(destination, id, true);
499 }
500
501 public bool CloseAgent(GridRegion destination, UUID id)
502 {
503 return CloseAgent(destination, id, false);
504 }
505
494 #endregion Agents 506 #endregion Agents
495 507
496 #region Objects 508 #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
71 bool ReleaseAgent(UUID originRegion, UUID id, string uri); 71 bool ReleaseAgent(UUID originRegion, UUID id, string uri);
72 72
73 /// <summary> 73 /// <summary>
74 /// Close child agent.
75 /// </summary>
76 /// <param name="regionHandle"></param>
77 /// <param name="id"></param>
78 /// <returns></returns>
79 bool CloseChildAgent(GridRegion destination, UUID id);
80
81 /// <summary>
74 /// Close agent. 82 /// Close agent.
75 /// </summary> 83 /// </summary>
76 /// <param name="regionHandle"></param> 84 /// <param name="regionHandle"></param>