mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
allow cap HomeLocation to be disabled setting Cap_HomeLocation = ""
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user