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(-) (limited to 'OpenSim/Services') 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 From 45ef3e9987def8385174c332fc56c90b0ba3fef8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 15 Mar 2010 20:32:36 -0700 Subject: Get the local inner simulation service object to the handler so that there is no possibility of cascading requests when failures happen. --- OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 5 +++++ OpenSim/Services/Interfaces/ISimulationService.cs | 1 + 2 files changed, 6 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index d3be1a8..ff0dd7e 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -63,6 +63,11 @@ namespace OpenSim.Services.Connectors.Simulation return null; } + public ISimulationService GetInnerService() + { + return null; + } + #region Agents protected virtual string AgentPath() diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index ec24d90..67d7cbe 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -36,6 +36,7 @@ namespace OpenSim.Services.Interfaces public interface ISimulationService { IScene GetScene(ulong regionHandle); + ISimulationService GetInnerService(); #region Agents -- cgit v1.1 From cffe39b95f1fb025fa696f71a9f1408038b1e316 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 15 Mar 2010 20:52:41 -0700 Subject: * Fixed a bug in Simian.IsSimianEnabled (since the default module strings follow the form OpenSim.Services.Connectors.dll:SimianGridServiceConnector instead of SimianGridServiceConnector) --- OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs index 166df41..7d97aaa 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs @@ -39,7 +39,7 @@ public static class Simian if (config.Configs["Modules"] != null) { string module = config.Configs["Modules"].GetString(moduleName); - return !String.IsNullOrEmpty(module) && module == connectorName; + return !String.IsNullOrEmpty(module) && module.EndsWith(connectorName); } return false; -- cgit v1.1 From d722519b31e702e864745bfcd6bd03e3d38ded21 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 16 Mar 2010 10:40:15 -0700 Subject: * Fixing the SimianGrid friend connector enabled detection since the friends module uses a different pattern in the .ini file --- .../Connectors/SimianGrid/SimianFriendsServiceConnector.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index 0d87494..89eb72d 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs @@ -76,7 +76,15 @@ namespace OpenSim.Services.Connectors.SimianGrid public void Initialise(IConfigSource source) { - if (Simian.IsSimianEnabled(source, "FriendsServices", this.Name)) + bool isSimianEnabled = false; + + if (source.Configs["Friends"] != null) + { + string module = source.Configs["Friends"].GetString("Connector"); + isSimianEnabled = !String.IsNullOrEmpty(module) && module.EndsWith(this.Name); + } + + if (isSimianEnabled) { IConfig assetConfig = source.Configs["FriendsService"]; if (assetConfig == null) -- cgit v1.1