diff options
author | lbsa71 | 2007-03-27 21:42:14 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-27 21:42:14 +0000 |
commit | f42d1fc825b7b9d22ae05836992531d9abd2a26d (patch) | |
tree | c316d0d2ec56a34c6c7f2099977bcc6f14e5eb24 /OpenSim.RegionServer/AgentAssetUpload.cs | |
parent | * Reverting todays work. It was worth a try. (diff) | |
download | opensim-SC_OLD-f42d1fc825b7b9d22ae05836992531d9abd2a26d.zip opensim-SC_OLD-f42d1fc825b7b9d22ae05836992531d9abd2a26d.tar.gz opensim-SC_OLD-f42d1fc825b7b9d22ae05836992531d9abd2a26d.tar.bz2 opensim-SC_OLD-f42d1fc825b7b9d22ae05836992531d9abd2a26d.tar.xz |
* revert the revert - begin the beguine
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/AgentAssetUpload.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim.RegionServer/AgentAssetUpload.cs index a482e80..9f85598 100644 --- a/OpenSim.RegionServer/AgentAssetUpload.cs +++ b/OpenSim.RegionServer/AgentAssetUpload.cs | |||
@@ -1,6 +1,7 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Assets; | ||
4 | using OpenSim.Framework.Assets; | 5 | using OpenSim.Framework.Assets; |
5 | using OpenSim.Framework.Utilities; | 6 | using OpenSim.Framework.Utilities; |
6 | using libsecondlife; | 7 | using libsecondlife; |
@@ -12,10 +13,14 @@ namespace OpenSim | |||
12 | { | 13 | { |
13 | private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>(); | 14 | private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>(); |
14 | private SimClient ourClient; | 15 | private SimClient ourClient; |
16 | private AssetCache m_assetCache; | ||
17 | private InventoryCache m_inventoryCache; | ||
15 | 18 | ||
16 | public AgentAssetUpload(SimClient client) | 19 | public AgentAssetUpload(SimClient client, AssetCache assetCache, InventoryCache inventoryCache) |
17 | { | 20 | { |
18 | this.ourClient = client; | 21 | this.ourClient = client; |
22 | m_assetCache = assetCache; | ||
23 | m_inventoryCache = inventoryCache; | ||
19 | } | 24 | } |
20 | 25 | ||
21 | public void AddUpload(LLUUID transactionID, AssetBase asset) | 26 | public void AddUpload(LLUUID transactionID, AssetBase asset) |
@@ -148,8 +153,8 @@ namespace OpenSim | |||
148 | //check if we should add it to inventory | 153 | //check if we should add it to inventory |
149 | if (trans.AddToInventory) | 154 | if (trans.AddToInventory) |
150 | { | 155 | { |
151 | OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); | 156 | m_assetCache.AddAsset(trans.Asset); |
152 | OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); | 157 | m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); |
153 | } | 158 | } |
154 | 159 | ||
155 | 160 | ||
@@ -176,7 +181,7 @@ namespace OpenSim | |||
176 | AssetTransaction trans = this.transactions[transactionID]; | 181 | AssetTransaction trans = this.transactions[transactionID]; |
177 | if (trans.UploadComplete) | 182 | if (trans.UploadComplete) |
178 | { | 183 | { |
179 | OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); | 184 | m_assetCache.AddAsset(trans.Asset); |
180 | asset = trans.Asset; | 185 | asset = trans.Asset; |
181 | } | 186 | } |
182 | } | 187 | } |
@@ -195,8 +200,8 @@ namespace OpenSim | |||
195 | if (trans.UploadComplete) | 200 | if (trans.UploadComplete) |
196 | { | 201 | { |
197 | //already complete so we can add it to the inventory | 202 | //already complete so we can add it to the inventory |
198 | OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); | 203 | m_assetCache.AddAsset(trans.Asset); |
199 | Console.WriteLine( "ITem created is " +OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); | 204 | Console.WriteLine( "ITem created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); |
200 | } | 205 | } |
201 | else | 206 | else |
202 | { | 207 | { |