aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorUbitUmarov2016-11-10 23:14:08 +0000
committerUbitUmarov2016-11-10 23:14:08 +0000
commit56a79a252c285c68cbdc856dc215d1155dff8c36 (patch)
treea4c7f39ab474939840656d1699fc9b7427467599 /OpenSim/Region/CoreModules/ServiceConnectorsOut
parentubOde: add a needed lock (diff)
downloadopensim-SC_OLD-56a79a252c285c68cbdc856dc215d1155dff8c36.zip
opensim-SC_OLD-56a79a252c285c68cbdc856dc215d1155dff8c36.tar.gz
opensim-SC_OLD-56a79a252c285c68cbdc856dc215d1155dff8c36.tar.bz2
opensim-SC_OLD-56a79a252c285c68cbdc856dc215d1155dff8c36.tar.xz
GetUserAccounts cannot cache null accounts
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs9
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs7
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs2
3 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index 9325de9..b72ffbb 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -211,9 +211,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
211 List<UserAccount> ext = UserAccountService.GetUserAccounts(scopeID, missing); 211 List<UserAccount> ext = UserAccountService.GetUserAccounts(scopeID, missing);
212 if(ext != null && ext.Count > 0) 212 if(ext != null && ext.Count > 0)
213 { 213 {
214 ret.AddRange(ext);
215 foreach(UserAccount acc in ext) 214 foreach(UserAccount acc in ext)
216 m_Cache.Cache(acc.PrincipalID, acc); 215 {
216 if(acc != null)
217 {
218 ret.Add(acc);
219 m_Cache.Cache(acc.PrincipalID, acc);
220 }
221 }
217 } 222 }
218 return ret; 223 return ret;
219 } 224 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index e84b666..f5eda11 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -190,8 +190,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
190 { 190 {
191 foreach(UserAccount acc in ext) 191 foreach(UserAccount acc in ext)
192 { 192 {
193 accs.Add(acc); 193 if(acc != null)
194 m_Cache.Cache(acc.PrincipalID, acc); 194 {
195 accs.Add(acc);
196 m_Cache.Cache(acc.PrincipalID, acc);
197 }
195 } 198 }
196 } 199 }
197 } 200 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
index f514bd7..03cb680 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
37 public class UserAccountCache : IUserAccountCacheModule 37 public class UserAccountCache : IUserAccountCacheModule
38 { 38 {
39 private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours! 39 private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
40 private const double CACHENULL_EXPIRATION_SECONDS = 600; // 5minutes 40 private const double CACHENULL_EXPIRATION_SECONDS = 600; // 10minutes
41 41
42// private static readonly ILog m_log = 42// private static readonly ILog m_log =
43// LogManager.GetLogger( 43// LogManager.GetLogger(