Fixed Simian.IsSimianEnabled() to allow mixing and matching of connectors

slimupdates
John Hurliman 2010-03-15 15:38:29 -07:00
parent 33f5d0d1e9
commit 84459d2bc2
10 changed files with 12 additions and 12 deletions

View File

@ -85,7 +85,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "AssetServices"))
if (Simian.IsSimianEnabled(source, "AssetServices", this.Name))
{
IConfig gridConfig = source.Configs["AssetService"];
if (gridConfig == null)

View File

@ -73,7 +73,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "AuthenticationServices"))
if (Simian.IsSimianEnabled(source, "AuthenticationServices", this.Name))
{
IConfig assetConfig = source.Configs["AuthenticationService"];
if (assetConfig == null)

View File

@ -78,7 +78,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "AvatarServices"))
if (Simian.IsSimianEnabled(source, "AvatarServices", this.Name))
{
IConfig gridConfig = source.Configs["AvatarService"];
if (gridConfig == null)

View File

@ -76,7 +76,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "FriendsServices"))
if (Simian.IsSimianEnabled(source, "FriendsServices", this.Name))
{
IConfig assetConfig = source.Configs["FriendsService"];
if (assetConfig == null)

View File

@ -34,12 +34,12 @@ using Nini.Config;
public static class Simian
{
public static bool IsSimianEnabled(IConfigSource config, string moduleName)
public static bool IsSimianEnabled(IConfigSource config, string moduleName, string connectorName)
{
if (config.Configs["Modules"] != null)
{
string module = config.Configs["Modules"].GetString("AuthenticationServices");
return !String.IsNullOrEmpty(module) && module.Contains("Simian");
string module = config.Configs["Modules"].GetString(moduleName);
return !String.IsNullOrEmpty(module) && module == connectorName;
}
return false;

View File

@ -80,7 +80,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "GridServices"))
if (Simian.IsSimianEnabled(source, "GridServices", this.Name))
{
IConfig gridConfig = source.Configs["GridService"];
if (gridConfig == null)

View File

@ -92,7 +92,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "InventoryServices"))
if (Simian.IsSimianEnabled(source, "InventoryServices", this.Name))
{
IConfig gridConfig = source.Configs["InventoryService"];
if (gridConfig == null)

View File

@ -104,7 +104,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "PresenceServices"))
if (Simian.IsSimianEnabled(source, "PresenceServices", this.Name))
{
IConfig gridConfig = source.Configs["PresenceService"];
if (gridConfig == null)

View File

@ -88,7 +88,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "UserAccountServices"))
if (Simian.IsSimianEnabled(source, "UserAccountServices", this.Name))
{
IConfig gridConfig = source.Configs["UserAccountService"];
if (gridConfig == null)

View File

@ -77,7 +77,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source)
{
if (Simian.IsSimianEnabled(source, "UserAccountServices"))
if (Simian.IsSimianEnabled(source, "UserAccountServices", this.Name))
{
IConfig assetConfig = source.Configs["UserAccountService"];
if (assetConfig == null)