diff options
author | Melanie | 2013-02-18 21:09:14 +0100 |
---|---|---|
committer | Melanie | 2013-02-18 21:09:14 +0100 |
commit | 8c0b9080a4fb013d559966fc8c8175fb16162c2d (patch) | |
tree | 85c27f85105afcc6f9e6427550a1090c6a43f0c3 /OpenSim/Region/Framework/Scenes | |
parent | Correctly remove https:// URLs from the http server. (diff) | |
download | opensim-SC-8c0b9080a4fb013d559966fc8c8175fb16162c2d.zip opensim-SC-8c0b9080a4fb013d559966fc8c8175fb16162c2d.tar.gz opensim-SC-8c0b9080a4fb013d559966fc8c8175fb16162c2d.tar.bz2 opensim-SC-8c0b9080a4fb013d559966fc8c8175fb16162c2d.tar.xz |
Fix an issue where the viewer would request the seed cap before
there was a handler for it.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e58aadc..7fcbed4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3622,7 +3622,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3622 | // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop | 3622 | // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop |
3623 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI | 3623 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI |
3624 | if (closeChildAgents && CapsModule != null) | 3624 | if (closeChildAgents && CapsModule != null) |
3625 | CapsModule.RemoveCaps(agentID); | 3625 | CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); |
3626 | 3626 | ||
3627 | // // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever | 3627 | // // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever |
3628 | // // this method is doing is HORRIBLE!!! | 3628 | // // this method is doing is HORRIBLE!!! |
@@ -3853,20 +3853,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
3853 | return false; | 3853 | return false; |
3854 | } | 3854 | } |
3855 | 3855 | ||
3856 | |||
3857 | ScenePresence sp = GetScenePresence(agent.AgentID); | 3856 | ScenePresence sp = GetScenePresence(agent.AgentID); |
3858 | 3857 | ||
3859 | if (sp != null && !sp.IsChildAgent) | 3858 | // If we have noo presence here or if that presence is a zombie root |
3859 | // presence that will be kicled, we need a new CAPS object. | ||
3860 | if (sp == null || (sp != null && !sp.IsChildAgent)) | ||
3860 | { | 3861 | { |
3861 | // We have a zombie from a crashed session. | 3862 | if (CapsModule != null) |
3862 | // Or the same user is trying to be root twice here, won't work. | 3863 | { |
3863 | // Kill it. | 3864 | lock (agent) |
3864 | m_log.WarnFormat( | 3865 | { |
3865 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3866 | CapsModule.SetAgentCapsSeeds(agent); |
3866 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3867 | CapsModule.CreateCaps(agent.AgentID, agent.circuitcode); |
3868 | } | ||
3869 | } | ||
3870 | } | ||
3871 | |||
3872 | if (sp != null) | ||
3873 | { | ||
3874 | if (!sp.IsChildAgent) | ||
3875 | { | ||
3876 | // We have a zombie from a crashed session. | ||
3877 | // Or the same user is trying to be root twice here, won't work. | ||
3878 | // Kill it. | ||
3879 | m_log.WarnFormat( | ||
3880 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | ||
3881 | sp.Name, sp.UUID, RegionInfo.RegionName); | ||
3867 | 3882 | ||
3868 | sp.ControllingClient.Close(true, true); | 3883 | sp.ControllingClient.Close(true, true); |
3869 | sp = null; | 3884 | sp = null; |
3885 | } | ||
3870 | } | 3886 | } |
3871 | 3887 | ||
3872 | lock (agent) | 3888 | lock (agent) |
@@ -3907,7 +3923,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3907 | if (vialogin || (!m_seeIntoBannedRegion)) | 3923 | if (vialogin || (!m_seeIntoBannedRegion)) |
3908 | { | 3924 | { |
3909 | if (!AuthorizeUser(agent, out reason)) | 3925 | if (!AuthorizeUser(agent, out reason)) |
3926 | { | ||
3910 | return false; | 3927 | return false; |
3928 | } | ||
3911 | } | 3929 | } |
3912 | } | 3930 | } |
3913 | catch (Exception e) | 3931 | catch (Exception e) |
@@ -3922,11 +3940,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3922 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, | 3940 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, |
3923 | agent.AgentID, agent.circuitcode); | 3941 | agent.AgentID, agent.circuitcode); |
3924 | 3942 | ||
3925 | if (CapsModule != null) | ||
3926 | { | ||
3927 | CapsModule.SetAgentCapsSeeds(agent); | ||
3928 | CapsModule.CreateCaps(agent.AgentID); | ||
3929 | } | ||
3930 | } | 3943 | } |
3931 | else | 3944 | else |
3932 | { | 3945 | { |
@@ -3952,6 +3965,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3952 | agent.teleportFlags = teleportFlags; | 3965 | agent.teleportFlags = teleportFlags; |
3953 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | 3966 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); |
3954 | 3967 | ||
3968 | if (CapsModule != null) | ||
3969 | { | ||
3970 | CapsModule.ActivateCaps(agent.circuitcode); | ||
3971 | } | ||
3972 | |||
3955 | if (vialogin) | 3973 | if (vialogin) |
3956 | { | 3974 | { |
3957 | // CleanDroppedAttachments(); | 3975 | // CleanDroppedAttachments(); |