From 4f79143f3f058b0570c073b668f4ea088e541a43 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 3 Sep 2010 13:36:35 -0700 Subject: * Removed Simian.IsSimianEnabled() call, changed the SimianGrid connectors to handle initialization as graceful as possible with the current broken way region module initialization is done * Added config-include/HyperSimianGrid.ini option for connecting to SimianGrid with HyperGrid enabled (work in progress on the SimianGrid side) --- .../Connectors/SimianGrid/SimianProfiles.cs | 42 +++++----------------- 1 file changed, 9 insertions(+), 33 deletions(-) (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index d30d880..a817d7c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs @@ -88,44 +88,20 @@ namespace OpenSim.Services.Connectors.SimianGrid public void Initialise(IConfigSource source) { - if (Simian.IsSimianEnabled(source, "UserAccountServices", "SimianUserAccountServiceConnector")) + IConfig gridConfig = source.Configs["UserAccountService"]; + if (gridConfig != null) { - IConfig gridConfig = source.Configs["UserAccountService"]; - if (gridConfig == null) - { - m_log.Error("[SIMIAN PROFILES]: UserAccountService missing from OpenSim.ini"); - throw new Exception("Profiles init error"); - } - string serviceUrl = gridConfig.GetString("UserAccountServerURI"); - if (String.IsNullOrEmpty(serviceUrl)) - { - m_log.Error("[SIMIAN PROFILES]: No UserAccountServerURI in section UserAccountService"); - throw new Exception("Profiles init error"); - } - - if (!serviceUrl.EndsWith("/")) - serviceUrl = serviceUrl + '/'; - - m_serverUrl = serviceUrl; - IConfig profilesConfig = source.Configs["Profiles"]; - if (profilesConfig == null) + if (!String.IsNullOrEmpty(serviceUrl)) { - // Do not run this module by default. - return; - } - else - { - // if profiles aren't enabled, we're not needed. - // if we're not specified as the connector to use, then we're not wanted - if (profilesConfig.GetString("Module", String.Empty) != Name) - { - - return; - } - m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Initializing {0}", this.Name); + if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) + serviceUrl = serviceUrl + '/'; + m_serverUrl = serviceUrl; } } + + if (String.IsNullOrEmpty(m_serverUrl)) + m_log.Info("[SIMIAN PROFILES]: No UserAccountServerURI specified, disabling connector"); } private void ClientConnectHandler(IClientCore clientCore) -- cgit v1.1 From 4243701d22dd86aa7ac61459a6bd9129635dab43 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 5 Sep 2010 19:06:50 +0100 Subject: Make Simian profiles respect the module chosen in [Profile] --- OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index a817d7c..0ef4974 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs @@ -67,6 +67,7 @@ namespace OpenSim.Services.Connectors.SimianGrid MethodBase.GetCurrentMethod().DeclaringType); private string m_serverUrl = String.Empty; + private bool m_Enabled = false; #region INonSharedRegionModule @@ -76,8 +77,8 @@ namespace OpenSim.Services.Connectors.SimianGrid public SimianProfiles() { } public string Name { get { return "SimianProfiles"; } } - public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } - public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } + public void AddRegion(Scene scene) { if (m_Enabled) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } + public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } #endregion INonSharedRegionModule @@ -88,6 +89,13 @@ namespace OpenSim.Services.Connectors.SimianGrid public void Initialise(IConfigSource source) { + IConfig profileConfig = source.Configs["Profile"]; + if (profileConfig == null) + return; + + if (profileConfig.GetString("Module", String.Empty) != Name) + return; + IConfig gridConfig = source.Configs["UserAccountService"]; if (gridConfig != null) { -- cgit v1.1