diff options
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index bd0b1b1..d79645e 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -333,6 +333,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
333 | public virtual void AssetReceived(AssetBase asset, bool IsTexture) | 333 | public virtual void AssetReceived(AssetBase asset, bool IsTexture) |
334 | { | 334 | { |
335 | AssetInfo assetInf = new AssetInfo(asset); | 335 | AssetInfo assetInf = new AssetInfo(asset); |
336 | |||
337 | ProcessRecievedAsset(IsTexture, assetInf); | ||
338 | |||
336 | if (!m_memcache.Contains(assetInf.FullID)) | 339 | if (!m_memcache.Contains(assetInf.FullID)) |
337 | { | 340 | { |
338 | m_memcache.AddOrUpdate(assetInf.FullID, assetInf, TimeSpan.FromHours(24)); | 341 | m_memcache.AddOrUpdate(assetInf.FullID, assetInf, TimeSpan.FromHours(24)); |
@@ -347,10 +350,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
347 | req.NumPackets = CalculateNumPackets(assetInf.Data); | 350 | req.NumPackets = CalculateNumPackets(assetInf.Data); |
348 | 351 | ||
349 | RequestedAssets.Remove(assetInf.FullID); | 352 | RequestedAssets.Remove(assetInf.FullID); |
350 | // If it's a direct request for a script, drop it | 353 | |
351 | // because it's a hacked client | 354 | if (req.AssetRequestSource == 2 && assetInf.Type == 10) |
352 | if (req.AssetRequestSource != 2 || assetInf.Type != 10) | 355 | { |
353 | lock(AssetRequests) AssetRequests.Add(req); | 356 | // If it's a direct request for a script, drop it |
357 | // because it's a hacked client | ||
358 | } | ||
359 | else | ||
360 | { | ||
361 | lock (AssetRequests) | ||
362 | { | ||
363 | AssetRequests.Add(req); | ||
364 | } | ||
365 | } | ||
354 | } | 366 | } |
355 | } | 367 | } |
356 | 368 | ||
@@ -377,6 +389,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
377 | } | 389 | } |
378 | } | 390 | } |
379 | 391 | ||
392 | protected void ProcessRecievedAsset(bool IsTexture, AssetInfo assetInf) | ||
393 | { | ||
394 | } | ||
395 | |||
380 | // See IAssetReceiver | 396 | // See IAssetReceiver |
381 | public virtual void AssetNotFound(UUID assetID, bool IsTexture) | 397 | public virtual void AssetNotFound(UUID assetID, bool IsTexture) |
382 | { | 398 | { |