From 84459d2bc22618ef082d717c8d9d33c6527e5e39 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 15 Mar 2010 15:38:29 -0700 Subject: Fixed Simian.IsSimianEnabled() to allow mixing and matching of connectors --- .../Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 2 +- .../Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs | 2 +- .../Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | 2 +- .../Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | 2 +- OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs | 6 +++--- .../Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | 2 +- .../Connectors/SimianGrid/SimianInventoryServiceConnector.cs | 2 +- .../Connectors/SimianGrid/SimianPresenceServiceConnector.cs | 2 +- OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | 2 +- .../Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 1c22a72..c5fbc9e 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs index 6317b87..cc53d6c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index a18cb22..00f9f36 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index b3ecc7e..0d87494 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs index c3de98e..166df41 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs @@ -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; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index eebdf14..071a481 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 891782f..67f8e80 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 1b5edf4..5e0f7c2 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index 9c226fb..0a36ae5 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs @@ -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) diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index bb0ac57..491a9a2 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -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) -- cgit v1.1