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, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 80d7871..98bc44f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5360,16 +5360,38 @@ namespace OpenSim.Region.Framework.Scenes
5360 } 5360 }
5361 } 5361 }
5362 5362
5363 ScenePresence presence = GetScenePresence(agentID);
5364 IClientAPI client = null;
5365 AgentCircuitData aCircuit = null;
5366
5367 if (presence != null)
5368 {
5369 client = presence.ControllingClient;
5370 if (client != null)
5371 aCircuit = client.RequestClientInfo();
5372 }
5373
5374 // We may be called before there is a presence or a client.
5375 // Fake AgentCircuitData to keep IAuthorizationModule smiling
5376 if (client == null)
5377 {
5378 aCircuit = new AgentCircuitData();
5379 aCircuit.AgentID = agentID;
5380 aCircuit.firstname = String.Empty;
5381 aCircuit.lastname = String.Empty;
5382 }
5383
5363 try 5384 try
5364 { 5385 {
5365 if (!AuthorizeUser(GetScenePresence(agentID).ControllingClient.RequestClientInfo(), out reason)) 5386 if (!AuthorizeUser(aCircuit, out reason))
5366 { 5387 {
5367 // m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID); 5388 // m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID);
5368 return false; 5389 return false;
5369 } 5390 }
5370 } 5391 }
5371 catch 5392 catch (Exception e)
5372 { 5393 {
5394 m_log.DebugFormat("[SCENE]: Exception authorizing agent: {0} "+ e.StackTrace, e.Message);
5373 return false; 5395 return false;
5374 } 5396 }
5375 5397