mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
* Minor fixes, inverted an if for readability and introduced a virtual pre-process step on the asset cache
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user