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