From 75be841839d0b4695625da5c2ce2c89b13758485 Mon Sep 17 00:00:00 2001 From: Tleiades Hax Date: Fri, 26 Oct 2007 13:12:49 +0000 Subject: Region ground texture was not marked as temporary, when being created, and assetcache did not check if an asset was temporary prior to uploading the cache to the asset server. Consequently the asset server was constantly being swamped by temporary ground textures. --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/AssetCache.cs') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 95183ad..a950f51 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -139,25 +139,27 @@ namespace OpenSim.Framework.Communications.Cache if (asset.Type == 0) { //Console.WriteLine("which is a texture"); - if (!this.Textures.ContainsKey(asset.FullID)) + if (!Textures.ContainsKey(asset.FullID)) { //texture TextureImage textur = new TextureImage(asset); - this.Textures.Add(textur.FullID, textur); - this._assetServer.StoreAndCommitAsset(asset); + Textures.Add(textur.FullID, textur); + if(!asset.Temporary) + _assetServer.StoreAndCommitAsset(asset); } else { TextureImage textur = new TextureImage(asset); - this.Textures[asset.FullID] = textur; + Textures[asset.FullID] = textur; } } else { - if (!this.Assets.ContainsKey(asset.FullID)) + if (!Assets.ContainsKey(asset.FullID)) { AssetInfo assetInf = new AssetInfo(asset); - this.Assets.Add(assetInf.FullID, assetInf); - this._assetServer.StoreAndCommitAsset(asset); + Assets.Add(assetInf.FullID, assetInf); + if (!asset.Temporary) + _assetServer.StoreAndCommitAsset(asset); } } } -- cgit v1.1