aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs29
1 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 1a442ea..1ae7eb7 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -334,6 +334,10 @@ namespace OpenSim.Framework.Communications.Cache
334 /// <param name="asset"></param> 334 /// <param name="asset"></param>
335 public void AddAsset(AssetBase asset) 335 public void AddAsset(AssetBase asset)
336 { 336 {
337// m_log.DebugFormat(
338// "[ASSET CACHE]: Uploaded asset {0}, temporary {1}, store local {2}",
339// asset.ID, asset.Temporary, asset.Local);
340
337 if (asset.Type == (int)AssetType.Texture) 341 if (asset.Type == (int)AssetType.Texture)
338 { 342 {
339 if (!Textures.ContainsKey(asset.FullID)) 343 if (!Textures.ContainsKey(asset.FullID))
@@ -344,11 +348,23 @@ namespace OpenSim.Framework.Communications.Cache
344 if (StatsManager.SimExtraStats != null) 348 if (StatsManager.SimExtraStats != null)
345 StatsManager.SimExtraStats.AddTexture(textur); 349 StatsManager.SimExtraStats.AddTexture(textur);
346 350
347 if (!asset.Temporary) 351 // According to http://wiki.secondlife.com/wiki/AssetUploadRequest, Local signifies that the
352 // information is stored locally. It could disappear, in which case we could send the
353 // ImageNotInDatabase packet to tell the client this. However, when this was enabled in
354 // TextureNotFoundSender it ended up crashing clients - we need to go back and try this again.
355 //
356 // In the mean time, we're just going to push local assets to the permanent store instead.
357 // TODO: Need to come back and address this.
358 // TODO: Also, Temporary is now deprecated. We should start ignoring it and not passing it out from LLClientView.
359 if (!asset.Temporary || asset.Local)
348 { 360 {
349 m_assetServer.StoreAsset(asset); 361 m_assetServer.StoreAsset(asset);
350 } 362 }
351 } 363 }
364// else
365// {
366// m_log.DebugFormat("[ASSET CACHE]: Textures already contains {0}", asset.ID);
367// }
352 } 368 }
353 else 369 else
354 { 370 {
@@ -360,11 +376,16 @@ namespace OpenSim.Framework.Communications.Cache
360 if (StatsManager.SimExtraStats != null) 376 if (StatsManager.SimExtraStats != null)
361 StatsManager.SimExtraStats.AddAsset(assetInf); 377 StatsManager.SimExtraStats.AddAsset(assetInf);
362 378
363 if (!asset.Temporary) 379 // See comment above.
380 if (!asset.Temporary || asset.Local)
364 { 381 {
365 m_assetServer.StoreAsset(asset); 382 m_assetServer.StoreAsset(asset);
366 } 383 }
367 } 384 }
385// else
386// {
387// m_log.DebugFormat("[ASSET CACHE]: Assets already contains {0}", asset.ID);
388// }
368 } 389 }
369 } 390 }
370 391
@@ -394,6 +415,8 @@ namespace OpenSim.Framework.Communications.Cache
394 // See IAssetReceiver 415 // See IAssetReceiver
395 public void AssetReceived(AssetBase asset, bool IsTexture) 416 public void AssetReceived(AssetBase asset, bool IsTexture)
396 { 417 {
418// m_log.DebugFormat("[ASSET CACHE]: Received asset {0}", asset.ID);
419
397 //check if it is a texture or not 420 //check if it is a texture or not
398 //then add to the correct cache list 421 //then add to the correct cache list
399 //then check for waiting requests for this asset/texture (in the Requested lists) 422 //then check for waiting requests for this asset/texture (in the Requested lists)
@@ -464,7 +487,7 @@ namespace OpenSim.Framework.Communications.Cache
464 // See IAssetReceiver 487 // See IAssetReceiver
465 public void AssetNotFound(UUID assetID, bool IsTexture) 488 public void AssetNotFound(UUID assetID, bool IsTexture)
466 { 489 {
467 //m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); 490// m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
468 491
469 if (IsTexture) 492 if (IsTexture)
470 { 493 {