* Minor fixes, inverted an if for readability and introduced a virtual pre-process step on the asset cache
parent
de3971a8d3
commit
3ca1481c3d
|
@ -333,6 +333,9 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
public virtual void AssetReceived(AssetBase asset, bool IsTexture)
|
||||
{
|
||||
AssetInfo assetInf = new AssetInfo(asset);
|
||||
|
||||
ProcessRecievedAsset(IsTexture, assetInf);
|
||||
|
||||
if (!m_memcache.Contains(assetInf.FullID))
|
||||
{
|
||||
m_memcache.AddOrUpdate(assetInf.FullID, assetInf, TimeSpan.FromHours(24));
|
||||
|
@ -347,10 +350,19 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
req.NumPackets = CalculateNumPackets(assetInf.Data);
|
||||
|
||||
RequestedAssets.Remove(assetInf.FullID);
|
||||
// If it's a direct request for a script, drop it
|
||||
// because it's a hacked client
|
||||
if (req.AssetRequestSource != 2 || assetInf.Type != 10)
|
||||
lock(AssetRequests) AssetRequests.Add(req);
|
||||
|
||||
if (req.AssetRequestSource == 2 && assetInf.Type == 10)
|
||||
{
|
||||
// If it's a direct request for a script, drop it
|
||||
// because it's a hacked client
|
||||
}
|
||||
else
|
||||
{
|
||||
lock (AssetRequests)
|
||||
{
|
||||
AssetRequests.Add(req);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -377,6 +389,10 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
}
|
||||
|
||||
protected void ProcessRecievedAsset(bool IsTexture, AssetInfo assetInf)
|
||||
{
|
||||
}
|
||||
|
||||
// See IAssetReceiver
|
||||
public virtual void AssetNotFound(UUID assetID, bool IsTexture)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue