diff options
author | Justin Clarke Casey | 2008-02-20 23:21:51 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-20 23:21:51 +0000 |
commit | b0c5ef0b68c8664d250d0b0c0c5c1ddb7eab3acf (patch) | |
tree | 4408c9d9ec8f42ac4644447590399065cca0b25e /OpenSim/Framework/Communications/Cache | |
parent | Treads command lists threads, but not thread name (yet) (diff) | |
download | opensim-SC_OLD-b0c5ef0b68c8664d250d0b0c0c5c1ddb7eab3acf.zip opensim-SC_OLD-b0c5ef0b68c8664d250d0b0c0c5c1ddb7eab3acf.tar.gz opensim-SC_OLD-b0c5ef0b68c8664d250d0b0c0c5c1ddb7eab3acf.tar.bz2 opensim-SC_OLD-b0c5ef0b68c8664d250d0b0c0c5c1ddb7eab3acf.tar.xz |
* Eliminate AssetCache.CopyAsset()
* Resolve a bad logic bug in AssetCache.GetAsset()
* This may make some asset related things work better (possibly getting main map images will now be improved).
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 5e6bd5f..8f8e362 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -299,6 +299,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
299 | 299 | ||
300 | if (TryGetCachedAsset(assetID, out asset)) | 300 | if (TryGetCachedAsset(assetID, out asset)) |
301 | { | 301 | { |
302 | return asset; | ||
303 | } | ||
304 | else | ||
305 | { | ||
302 | m_assetServer.RequestAsset(assetID, isTexture); | 306 | m_assetServer.RequestAsset(assetID, isTexture); |
303 | 307 | ||
304 | do | 308 | do |
@@ -316,10 +320,6 @@ namespace OpenSim.Framework.Communications.Cache | |||
316 | 320 | ||
317 | return null; | 321 | return null; |
318 | } | 322 | } |
319 | else | ||
320 | { | ||
321 | return asset; | ||
322 | } | ||
323 | } | 323 | } |
324 | 324 | ||
325 | /// <summary> | 325 | /// <summary> |
@@ -387,28 +387,6 @@ namespace OpenSim.Framework.Communications.Cache | |||
387 | m_log.DebugFormat("[ASSET CACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); | 387 | m_log.DebugFormat("[ASSET CACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); |
388 | } | 388 | } |
389 | 389 | ||
390 | /// <summary> | ||
391 | /// Copy an asset and add it to the cache with a new assetID. | ||
392 | /// XXX We shouldn't actually ever need to do this! | ||
393 | /// </summary> | ||
394 | /// <param name="assetID"></param> | ||
395 | /// <returns></returns> | ||
396 | public AssetBase CopyAsset(LLUUID assetID) | ||
397 | { | ||
398 | AssetBase asset; | ||
399 | |||
400 | if (TryGetCachedAsset(assetID, out asset)) | ||
401 | { | ||
402 | asset.FullID = LLUUID.Random(); // TODO: check for conflicts | ||
403 | AddAsset(asset); | ||
404 | return asset; | ||
405 | } | ||
406 | else | ||
407 | { | ||
408 | return null; | ||
409 | } | ||
410 | } | ||
411 | |||
412 | // See IAssetReceiver | 390 | // See IAssetReceiver |
413 | public void AssetReceived(AssetBase asset, bool IsTexture) | 391 | public void AssetReceived(AssetBase asset, bool IsTexture) |
414 | { | 392 | { |