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.cs30
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 {