As an exmple, add the code to disable connectors intot he simian asset
connectorviewer-2-initial-appearance
parent
64ec14c8c4
commit
4025b85a07
|
@ -55,6 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
private string m_serverUrl = String.Empty;
|
||||
private IImprovedAssetCache m_cache;
|
||||
private bool m_Enabled = false;
|
||||
|
||||
#region ISharedRegionModule
|
||||
|
||||
|
@ -73,8 +74,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public SimianAssetServiceConnector() { }
|
||||
public string Name { get { return "SimianAssetServiceConnector"; } }
|
||||
public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IAssetService>(this); } }
|
||||
public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IAssetService>(this); } }
|
||||
public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } }
|
||||
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } }
|
||||
|
||||
#endregion ISharedRegionModule
|
||||
|
||||
|
@ -84,6 +85,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig moduleConfig = source.Configs["Modules"];
|
||||
if (moduleConfig != null)
|
||||
{
|
||||
string name = moduleConfig.GetString("AssetServices", "");
|
||||
if (name == Name)
|
||||
{
|
||||
IConfig gridConfig = source.Configs["AssetService"];
|
||||
if (gridConfig != null)
|
||||
|
@ -99,6 +106,10 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
if (String.IsNullOrEmpty(m_serverUrl))
|
||||
m_log.Info("[SIMIAN ASSET CONNECTOR]: No AssetServerURI specified, disabling connector");
|
||||
else
|
||||
m_Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region IAssetService
|
||||
|
|
Loading…
Reference in New Issue