diff options
author | Melanie | 2013-05-06 23:42:39 +0100 |
---|---|---|
committer | Melanie | 2013-05-06 23:42:39 +0100 |
commit | e94b240f3d63ed2c0aa9812023853d38c5057b1b (patch) | |
tree | e3fa54613d291345e997e1da08e1cbab727383fd /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-e94b240f3d63ed2c0aa9812023853d38c5057b1b.zip opensim-SC-e94b240f3d63ed2c0aa9812023853d38c5057b1b.tar.gz opensim-SC-e94b240f3d63ed2c0aa9812023853d38c5057b1b.tar.bz2 opensim-SC-e94b240f3d63ed2c0aa9812023853d38c5057b1b.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c07661a..caeb980 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3885,7 +3885,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3885 | 3885 | ||
3886 | lock (agent) | 3886 | lock (agent) |
3887 | { | 3887 | { |
3888 | //On login test land permisions | 3888 | // Optimistic: add or update the circuit data with the new agent circuit data and teleport flags. |
3889 | // We need the circuit data here for some of the subsequent checks. (groups, for example) | ||
3890 | // If the checks fail, we remove the circuit. | ||
3891 | agent.teleportFlags = teleportFlags; | ||
3892 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | ||
3893 | |||
3894 | // On login test land permisions | ||
3889 | if (vialogin) | 3895 | if (vialogin) |
3890 | { | 3896 | { |
3891 | IUserAccountCacheModule cache = RequestModuleInterface<IUserAccountCacheModule>(); | 3897 | IUserAccountCacheModule cache = RequestModuleInterface<IUserAccountCacheModule>(); |
@@ -3894,6 +3900,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3894 | if (!TestLandRestrictions(agent.AgentID, out reason, ref agent.startpos.X, ref agent.startpos.Y)) | 3900 | if (!TestLandRestrictions(agent.AgentID, out reason, ref agent.startpos.X, ref agent.startpos.Y)) |
3895 | { | 3901 | { |
3896 | m_log.DebugFormat("[CONNECTION BEGIN]: Denying access to {0} due to no land access", agent.AgentID.ToString()); | 3902 | m_log.DebugFormat("[CONNECTION BEGIN]: Denying access to {0} due to no land access", agent.AgentID.ToString()); |
3903 | m_authenticateHandler.RemoveCircuit(agent.circuitcode); | ||
3897 | return false; | 3904 | return false; |
3898 | } | 3905 | } |
3899 | } | 3906 | } |
@@ -3905,11 +3912,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
3905 | try | 3912 | try |
3906 | { | 3913 | { |
3907 | if (!VerifyUserPresence(agent, out reason)) | 3914 | if (!VerifyUserPresence(agent, out reason)) |
3915 | { | ||
3916 | m_authenticateHandler.RemoveCircuit(agent.circuitcode); | ||
3908 | return false; | 3917 | return false; |
3909 | } catch (Exception e) | 3918 | } |
3919 | } | ||
3920 | catch (Exception e) | ||
3910 | { | 3921 | { |
3911 | m_log.ErrorFormat( | 3922 | m_log.ErrorFormat( |
3912 | "[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); | 3923 | "[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); |
3924 | |||
3925 | m_authenticateHandler.RemoveCircuit(agent.circuitcode); | ||
3913 | return false; | 3926 | return false; |
3914 | } | 3927 | } |
3915 | } | 3928 | } |
@@ -3922,6 +3935,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3922 | { | 3935 | { |
3923 | if (!AuthorizeUser(agent, out reason)) | 3936 | if (!AuthorizeUser(agent, out reason)) |
3924 | { | 3937 | { |
3938 | m_authenticateHandler.RemoveCircuit(agent.circuitcode); | ||
3925 | return false; | 3939 | return false; |
3926 | } | 3940 | } |
3927 | } | 3941 | } |
@@ -3930,6 +3944,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3930 | { | 3944 | { |
3931 | m_log.ErrorFormat( | 3945 | m_log.ErrorFormat( |
3932 | "[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); | 3946 | "[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); |
3947 | |||
3948 | m_authenticateHandler.RemoveCircuit(agent.circuitcode); | ||
3933 | return false; | 3949 | return false; |
3934 | } | 3950 | } |
3935 | 3951 | ||
@@ -3959,9 +3975,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3959 | } | 3975 | } |
3960 | } | 3976 | } |
3961 | 3977 | ||
3962 | // In all cases, add or update the circuit data with the new agent circuit data and teleport flags | ||
3963 | agent.teleportFlags = teleportFlags; | ||
3964 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | ||
3965 | 3978 | ||
3966 | if (CapsModule != null) | 3979 | if (CapsModule != null) |
3967 | { | 3980 | { |