diff options
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index eead05d..9140d78 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs | |||
@@ -144,10 +144,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
144 | return account; | 144 | return account; |
145 | 145 | ||
146 | account = base.GetUserAccount(scopeID, userID); | 146 | account = base.GetUserAccount(scopeID, userID); |
147 | lock(m_Cache) | 147 | if(account != null) |
148 | if(account != null) | 148 | { |
149 | lock(m_Cache) | ||
149 | m_Cache.Cache(userID, account); | 150 | m_Cache.Cache(userID, account); |
150 | 151 | } | |
151 | return account; | 152 | return account; |
152 | } | 153 | } |
153 | 154 | ||
@@ -162,9 +163,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
162 | 163 | ||
163 | account = base.GetUserAccount(scopeID, firstName, lastName); | 164 | account = base.GetUserAccount(scopeID, firstName, lastName); |
164 | if (account != null) | 165 | if (account != null) |
166 | { | ||
165 | lock(m_Cache) | 167 | lock(m_Cache) |
166 | m_Cache.Cache(account.PrincipalID, account); | 168 | m_Cache.Cache(account.PrincipalID, account); |
167 | 169 | } | |
168 | return account; | 170 | return account; |
169 | } | 171 | } |
170 | 172 | ||
@@ -195,16 +197,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
195 | List<UserAccount> ext = base.GetUserAccounts(scopeID, missing); | 197 | List<UserAccount> ext = base.GetUserAccounts(scopeID, missing); |
196 | if(ext != null && ext.Count >0 ) | 198 | if(ext != null && ext.Count >0 ) |
197 | { | 199 | { |
198 | accs.AddRange(ext); | ||
199 | foreach(UserAccount acc in ext) | 200 | foreach(UserAccount acc in ext) |
200 | { | 201 | { |
201 | if(acc != null) | 202 | if(acc != null) |
203 | { | ||
204 | accs.Add(acc); | ||
202 | lock(m_Cache) | 205 | lock(m_Cache) |
203 | m_Cache.Cache(acc.PrincipalID, acc); | 206 | m_Cache.Cache(acc.PrincipalID, acc); |
207 | } | ||
204 | } | 208 | } |
205 | } | 209 | } |
206 | } | 210 | } |
207 | |||
208 | return accs; | 211 | return accs; |
209 | } | 212 | } |
210 | 213 | ||