From 924c5fb55e8e5561c2d9d939b1c5dd77a9d6955a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 19:41:07 +0000 Subject: [PATCH] minor cleanup --- .../RemoteUserAccountServiceConnector.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index eead05d7ae..9140d786f5 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 return account; account = base.GetUserAccount(scopeID, userID); - lock(m_Cache) - if(account != null) + if(account != null) + { + lock(m_Cache) m_Cache.Cache(userID, account); - + } return account; } @@ -162,9 +163,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts account = base.GetUserAccount(scopeID, firstName, lastName); if (account != null) + { lock(m_Cache) m_Cache.Cache(account.PrincipalID, account); - + } return account; } @@ -195,16 +197,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts List ext = base.GetUserAccounts(scopeID, missing); if(ext != null && ext.Count >0 ) { - accs.AddRange(ext); foreach(UserAccount acc in ext) { if(acc != null) + { + accs.Add(acc); lock(m_Cache) m_Cache.Cache(acc.PrincipalID, acc); + } } } } - return accs; }