From 7adbe756fbb1d1c4cd71df90bd12d7e3da60bdf8 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 27 Mar 2007 20:45:04 +0000 Subject: * Reverting todays work. It was worth a try. --- OpenSim.RegionServer/AgentAssetUpload.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'OpenSim.RegionServer/AgentAssetUpload.cs') diff --git a/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim.RegionServer/AgentAssetUpload.cs index 9f85598..a482e80 100644 --- a/OpenSim.RegionServer/AgentAssetUpload.cs +++ b/OpenSim.RegionServer/AgentAssetUpload.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Text; -using OpenSim.Assets; using OpenSim.Framework.Assets; using OpenSim.Framework.Utilities; using libsecondlife; @@ -13,14 +12,10 @@ namespace OpenSim { private Dictionary transactions = new Dictionary(); private SimClient ourClient; - private AssetCache m_assetCache; - private InventoryCache m_inventoryCache; - public AgentAssetUpload(SimClient client, AssetCache assetCache, InventoryCache inventoryCache) + public AgentAssetUpload(SimClient client) { this.ourClient = client; - m_assetCache = assetCache; - m_inventoryCache = inventoryCache; } public void AddUpload(LLUUID transactionID, AssetBase asset) @@ -153,8 +148,8 @@ namespace OpenSim //check if we should add it to inventory if (trans.AddToInventory) { - m_assetCache.AddAsset(trans.Asset); - m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); + OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); + OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); } @@ -181,7 +176,7 @@ namespace OpenSim AssetTransaction trans = this.transactions[transactionID]; if (trans.UploadComplete) { - m_assetCache.AddAsset(trans.Asset); + OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); asset = trans.Asset; } } @@ -200,8 +195,8 @@ namespace OpenSim if (trans.UploadComplete) { //already complete so we can add it to the inventory - m_assetCache.AddAsset(trans.Asset); - Console.WriteLine( "ITem created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); + OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); + Console.WriteLine( "ITem created is " +OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); } else { -- cgit v1.1