aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs22
1 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 69fe137..ff7e5ed 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3687,14 +3687,21 @@ namespace OpenSim.Region.Framework.Scenes
3687 sp.ControllingClient.Close(true); 3687 sp.ControllingClient.Close(true);
3688 sp = null; 3688 sp = null;
3689 } 3689 }
3690 3690
3691 // Optimistic: add or update the circuit data with the new agent circuit data and teleport flags.
3692 // We need the circuit data here for some of the subsequent checks. (groups, for example)
3693 // If the checks fail, we remove the circuit.
3694 agent.teleportFlags = teleportFlags;
3695 m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
3696
3691 land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3697 land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3692 3698
3693 //On login test land permisions 3699 // On login test land permisions
3694 if (vialogin) 3700 if (vialogin)
3695 { 3701 {
3696 if (land != null && !TestLandRestrictions(agent, land, out reason)) 3702 if (land != null && !TestLandRestrictions(agent, land, out reason))
3697 { 3703 {
3704 m_authenticateHandler.RemoveCircuit(agent.circuitcode);
3698 return false; 3705 return false;
3699 } 3706 }
3700 } 3707 }
@@ -3706,13 +3713,17 @@ namespace OpenSim.Region.Framework.Scenes
3706 try 3713 try
3707 { 3714 {
3708 if (!VerifyUserPresence(agent, out reason)) 3715 if (!VerifyUserPresence(agent, out reason))
3716 {
3717 m_authenticateHandler.RemoveCircuit(agent.circuitcode);
3709 return false; 3718 return false;
3719 }
3710 } 3720 }
3711 catch (Exception e) 3721 catch (Exception e)
3712 { 3722 {
3713 m_log.ErrorFormat( 3723 m_log.ErrorFormat(
3714 "[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); 3724 "[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace);
3715 3725
3726 m_authenticateHandler.RemoveCircuit(agent.circuitcode);
3716 return false; 3727 return false;
3717 } 3728 }
3718 } 3729 }
@@ -3720,13 +3731,17 @@ namespace OpenSim.Region.Framework.Scenes
3720 try 3731 try
3721 { 3732 {
3722 if (!AuthorizeUser(agent, out reason)) 3733 if (!AuthorizeUser(agent, out reason))
3734 {
3735 m_authenticateHandler.RemoveCircuit(agent.circuitcode);
3723 return false; 3736 return false;
3737 }
3724 } 3738 }
3725 catch (Exception e) 3739 catch (Exception e)
3726 { 3740 {
3727 m_log.ErrorFormat( 3741 m_log.ErrorFormat(
3728 "[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); 3742 "[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace);
3729 3743
3744 m_authenticateHandler.RemoveCircuit(agent.circuitcode);
3730 return false; 3745 return false;
3731 } 3746 }
3732 3747
@@ -3761,9 +3776,6 @@ namespace OpenSim.Region.Framework.Scenes
3761 } 3776 }
3762 } 3777 }
3763 3778
3764 // In all cases, add or update the circuit data with the new agent circuit data and teleport flags
3765 agent.teleportFlags = teleportFlags;
3766 m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
3767 3779
3768 if (vialogin) 3780 if (vialogin)
3769 { 3781 {