diff options
author | Diva Canto | 2009-08-12 20:39:48 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-12 20:39:48 -0700 |
commit | 7aa54593e0b6672979feec97b8151ed134388723 (patch) | |
tree | eaa145993ba39c61f6cbfcd202deb50fbd125fe6 /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |
parent | * Added two new packet handler implementations for inventory ops. This is sta... (diff) | |
download | opensim-SC_OLD-7aa54593e0b6672979feec97b8151ed134388723.zip opensim-SC_OLD-7aa54593e0b6672979feec97b8151ed134388723.tar.gz opensim-SC_OLD-7aa54593e0b6672979feec97b8151ed134388723.tar.bz2 opensim-SC_OLD-7aa54593e0b6672979feec97b8151ed134388723.tar.xz |
Redirected all calls to CachedUserProfile methods to the inventory service. Redirection of the RootFolder property is still todo. This compiles but probably inventory will be inconsistent.
Diffstat (limited to '')
-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 | } |