diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 113918d..ba858ed 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -435,17 +435,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
435 | return; | 435 | return; |
436 | } | 436 | } |
437 | 437 | ||
438 | CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 438 | SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems); |
439 | |||
440 | if (null == userProfile) | ||
441 | { | ||
442 | m_log.ErrorFormat( | ||
443 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | ||
444 | remoteClient.Name, remoteClient.AgentId); | ||
445 | return; | ||
446 | } | ||
447 | |||
448 | userProfile.SendInventoryDecendents(remoteClient, folderID, fetchFolders, fetchItems); | ||
449 | } | 439 | } |
450 | 440 | ||
451 | /// <summary> | 441 | /// <summary> |
@@ -543,19 +533,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
543 | public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType, | 533 | public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType, |
544 | string folderName, UUID parentID) | 534 | string folderName, UUID parentID) |
545 | { | 535 | { |
546 | CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 536 | InventoryFolderBase folder = new InventoryFolderBase(folderID, folderName, remoteClient.AgentId, (short)folderType, parentID, 1); |
547 | 537 | if (!InventoryService.AddFolder(folder)) | |
548 | if (null == userProfile) | ||
549 | { | ||
550 | m_log.ErrorFormat( | ||
551 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | ||
552 | remoteClient.Name, remoteClient.AgentId); | ||
553 | return; | ||
554 | } | ||
555 | |||
556 | if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID)) | ||
557 | { | 538 | { |
558 | m_log.ErrorFormat( | 539 | m_log.WarnFormat( |
559 | "[AGENT INVENTORY]: Failed to move create folder for user {0} {1}", | 540 | "[AGENT INVENTORY]: Failed to move create folder for user {0} {1}", |
560 | remoteClient.Name, remoteClient.AgentId); | 541 | remoteClient.Name, remoteClient.AgentId); |
561 | } | 542 | } |