diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | 42 |
1 files changed, 9 insertions, 33 deletions
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 | |||
88 | 88 | ||
89 | public void Initialise(IConfigSource source) | 89 | public void Initialise(IConfigSource source) |
90 | { | 90 | { |
91 | if (Simian.IsSimianEnabled(source, "UserAccountServices", "SimianUserAccountServiceConnector")) | 91 | IConfig gridConfig = source.Configs["UserAccountService"]; |
92 | if (gridConfig != null) | ||
92 | { | 93 | { |
93 | IConfig gridConfig = source.Configs["UserAccountService"]; | ||
94 | if (gridConfig == null) | ||
95 | { | ||
96 | m_log.Error("[SIMIAN PROFILES]: UserAccountService missing from OpenSim.ini"); | ||
97 | throw new Exception("Profiles init error"); | ||
98 | } | ||
99 | |||
100 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); | 94 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); |
101 | if (String.IsNullOrEmpty(serviceUrl)) | 95 | if (!String.IsNullOrEmpty(serviceUrl)) |
102 | { | ||
103 | m_log.Error("[SIMIAN PROFILES]: No UserAccountServerURI in section UserAccountService"); | ||
104 | throw new Exception("Profiles init error"); | ||
105 | } | ||
106 | |||
107 | if (!serviceUrl.EndsWith("/")) | ||
108 | serviceUrl = serviceUrl + '/'; | ||
109 | |||
110 | m_serverUrl = serviceUrl; | ||
111 | IConfig profilesConfig = source.Configs["Profiles"]; | ||
112 | if (profilesConfig == null) | ||
113 | { | 96 | { |
114 | // Do not run this module by default. | 97 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) |
115 | return; | 98 | serviceUrl = serviceUrl + '/'; |
116 | } | 99 | m_serverUrl = serviceUrl; |
117 | else | ||
118 | { | ||
119 | // if profiles aren't enabled, we're not needed. | ||
120 | // if we're not specified as the connector to use, then we're not wanted | ||
121 | if (profilesConfig.GetString("Module", String.Empty) != Name) | ||
122 | { | ||
123 | |||
124 | return; | ||
125 | } | ||
126 | m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Initializing {0}", this.Name); | ||
127 | } | 100 | } |
128 | } | 101 | } |
102 | |||
103 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
104 | m_log.Info("[SIMIAN PROFILES]: No UserAccountServerURI specified, disabling connector"); | ||
129 | } | 105 | } |
130 | 106 | ||
131 | private void ClientConnectHandler(IClientCore clientCore) | 107 | private void ClientConnectHandler(IClientCore clientCore) |