aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-11 17:02:20 +0000
committerJustin Clarke Casey2008-04-11 17:02:20 +0000
commite26d4fc08556252c09e46bfa6aa2b59119f702dc (patch)
tree1be8d7ef98d58153ae3ab5904eec652f4edcb0af /OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
parent* minor documenting, cleanup, renaming in user profile cache service (diff)
downloadopensim-SC-e26d4fc08556252c09e46bfa6aa2b59119f702dc.zip
opensim-SC-e26d4fc08556252c09e46bfa6aa2b59119f702dc.tar.gz
opensim-SC-e26d4fc08556252c09e46bfa6aa2b59119f702dc.tar.bz2
opensim-SC-e26d4fc08556252c09e46bfa6aa2b59119f702dc.tar.xz
* minor: replace test of CachedUserInfo.RootFolder != null with something more readable, and make RootFolder get only
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 586c24e..b924d5c 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Framework.Communications.Cache
125 125
126 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 126 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
127 { 127 {
128 if (userProfile.RootFolder != null) 128 if (userProfile.HasInventory)
129 { 129 {
130 if (userProfile.RootFolder.ID == parentID) 130 if (userProfile.RootFolder.ID == parentID)
131 { 131 {
@@ -175,7 +175,7 @@ namespace OpenSim.Framework.Communications.Cache
175 175
176 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 176 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
177 { 177 {
178 if (userProfile.RootFolder != null) 178 if (userProfile.HasInventory)
179 { 179 {
180 InventoryFolderBase baseFolder = new InventoryFolderBase(); 180 InventoryFolderBase baseFolder = new InventoryFolderBase();
181 baseFolder.Owner = remoteClient.AgentId; 181 baseFolder.Owner = remoteClient.AgentId;
@@ -195,7 +195,7 @@ namespace OpenSim.Framework.Communications.Cache
195 195
196 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 196 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
197 { 197 {
198 if (userProfile.RootFolder != null) 198 if (userProfile.HasInventory)
199 { 199 {
200 InventoryFolderBase baseFolder = new InventoryFolderBase(); 200 InventoryFolderBase baseFolder = new InventoryFolderBase();
201 baseFolder.Owner = remoteClient.AgentId; 201 baseFolder.Owner = remoteClient.AgentId;
@@ -248,21 +248,21 @@ namespace OpenSim.Framework.Communications.Cache
248 // inventory failure. 248 // inventory failure.
249 // 249 //
250 // This is a crude way of dealing with that by retrying the lookup. 250 // This is a crude way of dealing with that by retrying the lookup.
251 if (userProfile.RootFolder == null) 251 if (!userProfile.HasInventory)
252 { 252 {
253 int attempts = 5; 253 int attempts = 5;
254 while (attempts-- > 0) 254 while (attempts-- > 0)
255 { 255 {
256 Thread.Sleep(3000); 256 Thread.Sleep(3000);
257 257
258 if (userProfile.RootFolder != null) 258 if (userProfile.HasInventory)
259 { 259 {
260 break; 260 break;
261 } 261 }
262 } 262 }
263 } 263 }
264 264
265 if (userProfile.RootFolder != null) 265 if (userProfile.HasInventory)
266 { 266 {
267 if (userProfile.RootFolder.ID == folderID) 267 if (userProfile.RootFolder.ID == folderID)
268 { 268 {
@@ -346,7 +346,7 @@ namespace OpenSim.Framework.Communications.Cache
346 CachedUserInfo userProfile; 346 CachedUserInfo userProfile;
347 if (m_userProfiles.TryGetValue(agentID, out userProfile)) 347 if (m_userProfiles.TryGetValue(agentID, out userProfile))
348 { 348 {
349 if (userProfile.RootFolder != null) 349 if (userProfile.HasInventory)
350 { 350 {
351 if (userProfile.RootFolder.ID == folderID) 351 if (userProfile.RootFolder.ID == folderID)
352 { 352 {
@@ -393,7 +393,7 @@ namespace OpenSim.Framework.Communications.Cache
393 CachedUserInfo userProfile; 393 CachedUserInfo userProfile;
394 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 394 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
395 { 395 {
396 if (userProfile.RootFolder != null) 396 if (userProfile.HasInventory)
397 { 397 {
398 InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID); 398 InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID);
399 if (subFolder != null) 399 if (subFolder != null)
@@ -420,7 +420,7 @@ namespace OpenSim.Framework.Communications.Cache
420 CachedUserInfo userProfile; 420 CachedUserInfo userProfile;
421 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 421 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
422 { 422 {
423 if (userProfile.RootFolder != null) 423 if (userProfile.HasInventory)
424 { 424 {
425 InventoryItemBase item = userProfile.RootFolder.HasItem(itemID); 425 InventoryItemBase item = userProfile.RootFolder.HasItem(itemID);
426 if (item != null) 426 if (item != null)