diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 6d9a0d6..84c549b 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -31,7 +31,9 @@ using System.Collections.Generic; | |||
31 | using System.Threading; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using libsecondlife.Packets; | 33 | using libsecondlife.Packets; |
34 | |||
34 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Statistics; | ||
35 | 37 | ||
36 | namespace OpenSim.Framework.Communications.Cache | 38 | namespace OpenSim.Framework.Communications.Cache |
37 | { | 39 | { |
@@ -220,9 +222,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
220 | result = "Duplicate ignored."; | 222 | result = "Duplicate ignored."; |
221 | } | 223 | } |
222 | else | 224 | else |
223 | { | 225 | { |
224 | TextureImage textur = new TextureImage(asset); | 226 | TextureImage textur = new TextureImage(asset); |
225 | Textures.Add(textur.FullID, textur); | 227 | Textures.Add(textur.FullID, textur); |
228 | |||
229 | if (StatsManager.SimExtraStats != null) | ||
230 | StatsManager.SimExtraStats.AddTexture(textur); | ||
231 | |||
226 | if (asset.Temporary) | 232 | if (asset.Temporary) |
227 | { | 233 | { |
228 | result = "Added to cache"; | 234 | result = "Added to cache"; |
@@ -244,6 +250,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
244 | { | 250 | { |
245 | AssetInfo assetInf = new AssetInfo(asset); | 251 | AssetInfo assetInf = new AssetInfo(asset); |
246 | Assets.Add(assetInf.FullID, assetInf); | 252 | Assets.Add(assetInf.FullID, assetInf); |
253 | |||
254 | if (StatsManager.SimExtraStats != null) | ||
255 | StatsManager.SimExtraStats.AddAsset(assetInf); | ||
256 | |||
247 | if (asset.Temporary) | 257 | if (asset.Temporary) |
248 | { | 258 | { |
249 | result = "Added to cache"; | 259 | result = "Added to cache"; |
@@ -292,8 +302,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
292 | 302 | ||
293 | TextureImage image = new TextureImage(asset); | 303 | TextureImage image = new TextureImage(asset); |
294 | if (!Textures.ContainsKey(image.FullID)) | 304 | if (!Textures.ContainsKey(image.FullID)) |
295 | { | 305 | { |
296 | Textures.Add(image.FullID, image); | 306 | Textures.Add(image.FullID, image); |
307 | |||
308 | if (StatsManager.SimExtraStats != null) | ||
309 | StatsManager.SimExtraStats.AddTexture(image); | ||
310 | |||
297 | if (RequestedTextures.ContainsKey(image.FullID)) | 311 | if (RequestedTextures.ContainsKey(image.FullID)) |
298 | { | 312 | { |
299 | AssetRequest req = RequestedTextures[image.FullID]; | 313 | AssetRequest req = RequestedTextures[image.FullID]; |
@@ -312,6 +326,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
312 | if (!Assets.ContainsKey(assetInf.FullID)) | 326 | if (!Assets.ContainsKey(assetInf.FullID)) |
313 | { | 327 | { |
314 | Assets.Add(assetInf.FullID, assetInf); | 328 | Assets.Add(assetInf.FullID, assetInf); |
329 | |||
330 | if (StatsManager.SimExtraStats != null) | ||
331 | StatsManager.SimExtraStats.AddAsset(assetInf); | ||
332 | |||
315 | if (RequestedAssets.ContainsKey(assetInf.FullID)) | 333 | if (RequestedAssets.ContainsKey(assetInf.FullID)) |
316 | { | 334 | { |
317 | AssetRequest req = RequestedAssets[assetInf.FullID]; | 335 | AssetRequest req = RequestedAssets[assetInf.FullID]; |