diff options
author | Justin Clark-Casey (justincc) | 2012-06-08 00:18:25 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-08 00:18:25 +0100 |
commit | b56673c920603022fce9cb479b714f6fbd0f1311 (patch) | |
tree | 5ec835ceeba54c1658fb888bed781994a45487c5 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Record the fact that child agents can have asset transactions. (diff) | |
download | opensim-SC-b56673c920603022fce9cb479b714f6fbd0f1311.zip opensim-SC-b56673c920603022fce9cb479b714f6fbd0f1311.tar.gz opensim-SC-b56673c920603022fce9cb479b714f6fbd0f1311.tar.bz2 opensim-SC-b56673c920603022fce9cb479b714f6fbd0f1311.tar.xz |
Fix bug with "kick user" reducing agent counts by 2 instead of 1.
This is done by making the kick user command call IClientAPI.Close() rather than routing through Scene.IncomingCloseAgent(), which also called IClientAPI.Close()
DisableSimulator for child agents is moved from IncomingCloseAgent() to RemoveClient(), this is not a functional change since IncomingCloseAgent() always ends up calling RemoveClient()
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 939c8fa..17503b1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -940,7 +940,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
940 | else | 940 | else |
941 | { | 941 | { |
942 | m_log.InfoFormat( | 942 | m_log.InfoFormat( |
943 | "[INTERGRID]: Got notice about far away Region: {0} at ({1}, {2})", | 943 | "[SCENE]: Got notice about far away Region: {0} at ({1}, {2})", |
944 | otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY); | 944 | otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY); |
945 | } | 945 | } |
946 | } | 946 | } |
@@ -3235,6 +3235,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
3235 | { | 3235 | { |
3236 | isChildAgent = avatar.IsChildAgent; | 3236 | isChildAgent = avatar.IsChildAgent; |
3237 | 3237 | ||
3238 | // Don't do this to root agents, it's not nice for the viewer | ||
3239 | if (closeChildAgents && isChildAgent) | ||
3240 | { | ||
3241 | // Tell a single agent to disconnect from the region. | ||
3242 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); | ||
3243 | if (eq != null) | ||
3244 | { | ||
3245 | eq.DisableSimulator(RegionInfo.RegionHandle, avatar.UUID); | ||
3246 | } | ||
3247 | else | ||
3248 | { | ||
3249 | avatar.ControllingClient.SendShutdownConnectionNotice(); | ||
3250 | } | ||
3251 | } | ||
3252 | |||
3253 | // Only applies to root agents. | ||
3238 | if (avatar.ParentID != 0) | 3254 | if (avatar.ParentID != 0) |
3239 | { | 3255 | { |
3240 | avatar.StandUp(); | 3256 | avatar.StandUp(); |
@@ -4033,19 +4049,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4033 | m_sceneGraph.removeUserCount(true); | 4049 | m_sceneGraph.removeUserCount(true); |
4034 | } | 4050 | } |
4035 | 4051 | ||
4036 | // Don't do this to root agents on logout, it's not nice for the viewer | ||
4037 | if (presence.IsChildAgent) | ||
4038 | { | ||
4039 | // Tell a single agent to disconnect from the region. | ||
4040 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); | ||
4041 | if (eq != null) | ||
4042 | { | ||
4043 | eq.DisableSimulator(RegionInfo.RegionHandle, agentID); | ||
4044 | } | ||
4045 | else | ||
4046 | presence.ControllingClient.SendShutdownConnectionNotice(); | ||
4047 | } | ||
4048 | |||
4049 | presence.ControllingClient.Close(); | 4052 | presence.ControllingClient.Close(); |
4050 | return true; | 4053 | return true; |
4051 | } | 4054 | } |