aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 54956ee..becea1f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3452,7 +3452,7 @@ namespace OpenSim.Region.Framework.Scenes
3452 regions.Remove(RegionInfo.RegionHandle); 3452 regions.Remove(RegionInfo.RegionHandle);
3453 3453
3454 // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours. 3454 // This ends up being done asynchronously so that a logout isn't held up where there are many present but unresponsive neighbours.
3455 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); 3455 m_sceneGridService.SendCloseChildAgentConnections(agentID, Util.Md5Hash(acd.Id0), regions);
3456 } 3456 }
3457 3457
3458 m_eventManager.TriggerClientClosed(agentID, this); 3458 m_eventManager.TriggerClientClosed(agentID, this);
@@ -4277,6 +4277,25 @@ namespace OpenSim.Region.Framework.Scenes
4277 4277
4278 return false; 4278 return false;
4279 } 4279 }
4280 /// <summary>
4281 /// Authenticated close (via network)
4282 /// </summary>
4283 /// <param name="agentID"></param>
4284 /// <param name="force"></param>
4285 /// <param name="auth_token"></param>
4286 /// <returns></returns>
4287 public bool IncomingCloseAgent(UUID agentID, bool force, string auth_token)
4288 {
4289 //m_log.DebugFormat("[SCENE]: Processing incoming close agent {0} in region {1} with auth_token {2}", agentID, RegionInfo.RegionName, auth_token);
4290
4291 // Check that the auth_token is valid
4292 AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID);
4293 if (acd != null && Util.Md5Hash(acd.Id0) == auth_token)
4294 return IncomingCloseAgent(agentID, force);
4295 else
4296 m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token);
4297 return false;
4298 }
4280 4299
4281 /// <summary> 4300 /// <summary>
4282 /// Tell a single agent to disconnect from the region. 4301 /// Tell a single agent to disconnect from the region.
@@ -4292,12 +4311,9 @@ namespace OpenSim.Region.Framework.Scenes
4292 4311
4293 ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); 4312 ScenePresence presence = m_sceneGraph.GetScenePresence(agentID);
4294 if (presence != null) 4313 if (presence != null)
4295 {
4296 presence.ControllingClient.Close(force); 4314 presence.ControllingClient.Close(force);
4297 return true;
4298 }
4299 4315
4300 // Agent not here 4316 // Agent not here
4301 return false; 4317 return false;
4302 } 4318 }
4303 4319