From 7aa54593e0b6672979feec97b8151ed134388723 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 12 Aug 2009 20:39:48 -0700 Subject: 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. --- .../AssetTransaction/AgentAssetsTransactions.cs | 47 +++++++++------------- 1 file changed, 18 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs') diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 8d586c4..c9ee54f 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs @@ -192,40 +192,29 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction { if (XferUploaders.ContainsKey(transactionID)) { - CachedUserInfo userInfo = Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails( - remoteClient.AgentId); + UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); - if (userInfo != null) - { - UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); - - AssetBase asset = Manager.MyScene.AssetService.Get(assetID.ToString()); - - if (asset == null) - { - asset = GetTransactionAsset(transactionID); - } - - if (asset != null && asset.FullID == assetID) - { - // Assets never get updated, new ones get created - asset.FullID = UUID.Random(); - asset.Name = item.Name; - asset.Description = item.Description; - asset.Type = (sbyte)item.AssetType; - item.AssetID = asset.FullID; - - Manager.MyScene.AssetService.Store(asset); - } + AssetBase asset = Manager.MyScene.AssetService.Get(assetID.ToString()); - userInfo.UpdateItem(item); + if (asset == null) + { + asset = GetTransactionAsset(transactionID); } - else + + if (asset != null && asset.FullID == assetID) { - m_log.ErrorFormat( - "[ASSET TRANSACTIONS]: Could not find user {0} for inventory item update", - remoteClient.AgentId); + // Assets never get updated, new ones get created + asset.FullID = UUID.Random(); + asset.Name = item.Name; + asset.Description = item.Description; + asset.Type = (sbyte)item.AssetType; + item.AssetID = asset.FullID; + + Manager.MyScene.AssetService.Store(asset); } + + IInventoryService invService = Manager.MyScene.InventoryService; + invService.UpdateItem(item); } } } -- cgit v1.1