diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 56c73ec..4c8662f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -77,25 +77,20 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
77 | 77 | ||
78 | public void Initialise(IConfigSource source) | 78 | public void Initialise(IConfigSource source) |
79 | { | 79 | { |
80 | if (Simian.IsSimianEnabled(source, "UserAccountServices", this.Name)) | 80 | IConfig gridConfig = source.Configs["UserAccountService"]; |
81 | if (gridConfig != null) | ||
81 | { | 82 | { |
82 | IConfig assetConfig = source.Configs["UserAccountService"]; | 83 | string serviceUrl = gridConfig.GetString("UserAccountServerURI"); |
83 | if (assetConfig == null) | 84 | if (!String.IsNullOrEmpty(serviceUrl)) |
84 | { | 85 | { |
85 | m_log.Error("[SIMIAN ACCOUNT CONNECTOR]: UserAccountService missing from OpenSim.ini"); | 86 | if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) |
86 | throw new Exception("User account connector init error"); | 87 | serviceUrl = serviceUrl + '/'; |
88 | m_serverUrl = serviceUrl; | ||
87 | } | 89 | } |
88 | |||
89 | string serviceURI = assetConfig.GetString("UserAccountServerURI"); | ||
90 | if (String.IsNullOrEmpty(serviceURI)) | ||
91 | { | ||
92 | m_log.Error("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI in section UserAccountService, skipping SimianUserAccountServiceConnector"); | ||
93 | throw new Exception("User account connector init error"); | ||
94 | } | ||
95 | |||
96 | m_accountCache = new ExpiringCache<UUID, UserAccount>(); | ||
97 | m_serverUrl = serviceURI; | ||
98 | } | 90 | } |
91 | |||
92 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
93 | m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector"); | ||
99 | } | 94 | } |
100 | 95 | ||
101 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) | 96 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) |