aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-09-03 22:27:01 +0100
committerJustin Clark-Casey (justincc)2010-09-03 22:27:01 +0100
commit9b95bd259fa15157947326f044f63aedc248e73c (patch)
treeb89733673d71a41529b40ea55f2e66d712991ecb /OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
parentminor: remove mono compiler warning (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-9b95bd259fa15157947326f044f63aedc248e73c.zip
opensim-SC_OLD-9b95bd259fa15157947326f044f63aedc248e73c.tar.gz
opensim-SC_OLD-9b95bd259fa15157947326f044f63aedc248e73c.tar.bz2
opensim-SC_OLD-9b95bd259fa15157947326f044f63aedc248e73c.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs25
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)