diff options
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 708ced3..855b213 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -47,14 +47,14 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
47 | /// users) to the SimianGrid backend | 47 | /// users) to the SimianGrid backend |
48 | /// </summary> | 48 | /// </summary> |
49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
50 | public class SimianUserAccountServiceConnector : IUserAccountService | 50 | public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule |
51 | { | 51 | { |
52 | private static readonly ILog m_log = | 52 | private static readonly ILog m_log = |
53 | LogManager.GetLogger( | 53 | LogManager.GetLogger( |
54 | MethodBase.GetCurrentMethod().DeclaringType); | 54 | MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | private string m_serverUrl = String.Empty; | 56 | private string m_serverUrl = String.Empty; |
57 | private ExpiringCache<UUID, UserAccount> m_accountCache = new ExpiringCache<UUID, UserAccount>(); | 57 | private ExpiringCache<UUID, UserAccount> m_accountCache; |
58 | 58 | ||
59 | #region ISharedRegionModule | 59 | #region ISharedRegionModule |
60 | 60 | ||
@@ -65,8 +65,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
65 | 65 | ||
66 | public SimianUserAccountServiceConnector() { } | 66 | public SimianUserAccountServiceConnector() { } |
67 | public string Name { get { return "SimianUserAccountServiceConnector"; } } | 67 | public string Name { get { return "SimianUserAccountServiceConnector"; } } |
68 | public void AddRegion(Scene scene) { scene.RegisterModuleInterface<IUserAccountService>(this); } | 68 | public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IUserAccountService>(this); } } |
69 | public void RemoveRegion(Scene scene) { scene.UnregisterModuleInterface<IUserAccountService>(this); } | 69 | public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IUserAccountService>(this); } } |
70 | 70 | ||
71 | #endregion ISharedRegionModule | 71 | #endregion ISharedRegionModule |
72 | 72 | ||
@@ -80,8 +80,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
80 | IConfig assetConfig = source.Configs["UserAccountService"]; | 80 | IConfig assetConfig = source.Configs["UserAccountService"]; |
81 | if (assetConfig == null) | 81 | if (assetConfig == null) |
82 | { | 82 | { |
83 | m_log.Error("[ACCOUNT CONNECTOR]: UserAccountService missing from OpenSim.ini"); | 83 | m_log.Error("[ACCOUNT CONNECTOR]: UserAccountService missing from OpenSim.ini, skipping SimianUserAccountServiceConnector"); |
84 | throw new Exception("User account connector init error"); | 84 | return; |
85 | } | 85 | } |
86 | 86 | ||
87 | string serviceURI = assetConfig.GetString("UserAccountServerURI"); | 87 | string serviceURI = assetConfig.GetString("UserAccountServerURI"); |
@@ -91,6 +91,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
91 | throw new Exception("User account connector init error"); | 91 | throw new Exception("User account connector init error"); |
92 | } | 92 | } |
93 | 93 | ||
94 | m_accountCache = new ExpiringCache<UUID, UserAccount>(); | ||
94 | m_serverUrl = serviceURI; | 95 | m_serverUrl = serviceURI; |
95 | } | 96 | } |
96 | 97 | ||