From 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d Mon Sep 17 00:00:00 2001 From: diva Date: Fri, 15 May 2009 05:00:25 +0000 Subject: Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only. This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now --- .../Agent/AssetTransaction/AgentAssetsTransactions.cs | 9 ++++----- .../CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/Agent/AssetTransaction') diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index eefcfe8..94140fc 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs @@ -32,6 +32,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Framework.Scenes; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Agent.AssetTransaction { @@ -177,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction asset.Type = (sbyte)item.Type; item.AssetID = asset.FullID; - Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); + Manager.MyScene.AssetService.Store(asset); if (part.Inventory.UpdateInventoryItem(item)) part.GetProperties(remoteClient); @@ -198,9 +199,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction { UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); - AssetBase asset - = Manager.MyScene.CommsManager.AssetCache.GetAsset( - assetID, (item.AssetType == (int)AssetType.Texture ? true : false)); + AssetBase asset = Manager.MyScene.AssetService.Get(assetID.ToString()); if (asset == null) { @@ -216,7 +215,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction asset.Type = (sbyte)item.AssetType; item.AssetID = asset.FullID; - Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); + Manager.MyScene.AssetService.Store(asset); } userInfo.UpdateItem(item); diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index a8e5ae3..6044949 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs @@ -153,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction } else if (m_storeLocal) { - m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); + m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); } m_log.DebugFormat("[ASSET TRANSACTIONS]: Uploaded asset data for transaction {0}", TransactionID); @@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction private void DoCreateItem(uint callbackID) { - m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); + m_userTransactions.Manager.MyScene.AssetService.Store(m_asset); CachedUserInfo userInfo = m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails( ourClient.AgentId); -- cgit v1.1