aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index bf8ff40..cbf2ded 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -201,6 +201,9 @@ namespace OpenSim.Framework.Communications.Cache
201 public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, 201 public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name,
202 LLUUID parentID) 202 LLUUID parentID)
203 { 203 {
204// m_log.DebugFormat(
205// "[AGENT INVENTORY] Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
206
204 CachedUserInfo userProfile; 207 CachedUserInfo userProfile;
205 208
206 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 209 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -216,6 +219,10 @@ namespace OpenSim.Framework.Communications.Cache
216 baseFolder.Version = userProfile.RootFolder.Version; 219 baseFolder.Version = userProfile.RootFolder.Version;
217 m_commsManager.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder); 220 m_commsManager.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder);
218 } 221 }
222 else
223 {
224 userProfile.AddRequest(new UpdateFolderRequest(this, remoteClient, folderID, type, name, parentID));
225 }
219 } 226 }
220 } 227 }
221 228
@@ -492,4 +499,33 @@ namespace OpenSim.Framework.Communications.Cache
492 } 499 }
493 } 500 }
494 } 501 }
502
503 /// <summary>
504 /// Used to create an update folder request if we haven't yet received the user's inventory
505 /// </summary>
506 internal class UpdateFolderRequest : IInventoryRequest
507 {
508 private UserProfileCacheService m_userProfileCacheService;
509 private IClientAPI m_client;
510 private LLUUID m_folderID;
511 private ushort m_type;
512 private string m_name;
513 private LLUUID m_parentID;
514
515 internal UpdateFolderRequest(
516 UserProfileCacheService cacheService, IClientAPI client, LLUUID folderID, ushort type, string name, LLUUID parentID)
517 {
518 m_userProfileCacheService = cacheService;
519 m_client = client;
520 m_folderID = folderID;
521 m_type = type;
522 m_name = name;
523 m_parentID = parentID;
524 }
525
526 public void Execute()
527 {
528 m_userProfileCacheService.HandleUpdateInventoryFolder(m_client, m_folderID, m_type, m_name, m_parentID);
529 }
530 }
495} 531}