diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 71da8dc..f640fb8 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -36,8 +36,6 @@ namespace OpenSim.Framework.Communications.Cache | |||
36 | { | 36 | { |
37 | internal delegate void MoveInventoryFolderDelegate(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID); | 37 | internal delegate void MoveInventoryFolderDelegate(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID); |
38 | internal delegate void PurgeInventoryDescendentsDelegate(IClientAPI remoteClient, LLUUID folderID); | 38 | internal delegate void PurgeInventoryDescendentsDelegate(IClientAPI remoteClient, LLUUID folderID); |
39 | internal delegate void UpdateInventoryFolderDelegate( | ||
40 | IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID); | ||
41 | 39 | ||
42 | /// <summary> | 40 | /// <summary> |
43 | /// Holds user profile information and retrieves it from backend services. | 41 | /// Holds user profile information and retrieves it from backend services. |
@@ -198,24 +196,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
198 | 196 | ||
199 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) | 197 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) |
200 | { | 198 | { |
201 | if (userProfile.HasInventory) | 199 | if (!userProfile.UpdateFolder(name, folderID, type, parentID)) |
202 | { | ||
203 | InventoryFolderBase baseFolder = new InventoryFolderBase(); | ||
204 | baseFolder.Owner = remoteClient.AgentId; | ||
205 | baseFolder.ID = folderID; | ||
206 | baseFolder.Name = name; | ||
207 | baseFolder.ParentID = parentID; | ||
208 | baseFolder.Type = (short) type; | ||
209 | baseFolder.Version = userProfile.RootFolder.Version; | ||
210 | |||
211 | m_commsManager.InventoryService.AddFolder(baseFolder); | ||
212 | } | ||
213 | else | ||
214 | { | 200 | { |
215 | userProfile.AddRequest( | 201 | m_log.ErrorFormat( |
216 | new InventoryRequest( | 202 | "[AGENT INVENTORY]: Failed to create folder for user {0} {1}", |
217 | Delegate.CreateDelegate(typeof(UpdateInventoryFolderDelegate), this, "HandleUpdateInventoryFolder"), | 203 | remoteClient.Name, remoteClient.AgentId); |
218 | new object[] { remoteClient, folderID, type, name, parentID })); | ||
219 | } | 204 | } |
220 | } | 205 | } |
221 | else | 206 | else |