From 4b73550eeeafa52e23c326c9b2e87ac4e9624b7b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 18 Aug 2016 13:17:36 +0100 Subject: allow cap HomeLocation to be disabled setting Cap_HomeLocation = "" --- .../Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index bedd3d0..f5b46bd 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -122,6 +122,8 @@ namespace OpenSim.Region.ClientStack.Linden private float m_PrimScaleMin = 0.001f; + private bool m_AllowCapHomeLocation = true; + private enum FileAgentInventoryState : int { idle = 0, @@ -176,6 +178,15 @@ namespace OpenSim.Region.ClientStack.Linden m_testAssetsCreatorID = id; } } + + IConfig CapsConfig = config.Configs["ClientStack.LindenCaps"]; + if (CapsConfig != null) + { + string homeLocationUrl = CapsConfig.GetString("Cap_HomeLocation", "localhost"); + if(homeLocationUrl == String.Empty) + m_AllowCapHomeLocation = false; + + } } m_assetService = m_Scene.AssetService; @@ -241,10 +252,12 @@ namespace OpenSim.Region.ClientStack.Linden m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptTask", req); - IRequestHandler HomeLocationHandler = new RestStreamHandler( + if(m_AllowCapHomeLocation) + { + IRequestHandler HomeLocationHandler = new RestStreamHandler( "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null); - m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); - + m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); + } // IRequestHandler animSetRequestHandler // = new RestStreamHandler( // "POST", capsBase + m_animSetTaskUpdatePath, AnimSetTaskInventory, "UpdateScript", null); -- cgit v1.1