aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorTom Grimshaw2010-05-18 03:24:43 -0700
committerTom Grimshaw2010-05-18 03:24:43 -0700
commit1c040d8c1ed5ee1ba1e80aa1d248a9b06d1790a5 (patch)
treec85d36357a2ae9f7a81d8e81b23039b5bdf06d08 /OpenSim/Region/Framework
parentMissed a nullref in the previous commit (diff)
downloadopensim-SC_OLD-1c040d8c1ed5ee1ba1e80aa1d248a9b06d1790a5.zip
opensim-SC_OLD-1c040d8c1ed5ee1ba1e80aa1d248a9b06d1790a5.tar.gz
opensim-SC_OLD-1c040d8c1ed5ee1ba1e80aa1d248a9b06d1790a5.tar.bz2
opensim-SC_OLD-1c040d8c1ed5ee1ba1e80aa1d248a9b06d1790a5.tar.xz
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.
Diffstat (limited to '')
-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
3 files changed, 27 insertions, 6 deletions
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)