From 70ad5604cddd24b896e843255325240116a4dc22 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 27 Feb 2008 22:47:33 +0000 Subject: disabled AssetDownloadModule and re-enabled the asset download code in the asset cache, until it can be seen if the module was the cause of some new problems that seem like they might be related to assets. I'll look into this more tomorrow. --- .../Framework/Communications/Cache/AssetCache.cs | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 29c7059..35a0088 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -69,12 +69,12 @@ namespace OpenSim.Framework.Communications.Cache /// /// Assets requests which are waiting for asset server data. This includes texture requests /// - // private Dictionary RequestedAssets; + private Dictionary RequestedAssets; /// /// Asset requests with data which are ready to be sent back to requesters. This includes textures. /// - // private List AssetRequests; + private List AssetRequests; /// @@ -84,7 +84,7 @@ namespace OpenSim.Framework.Communications.Cache private readonly IAssetServer m_assetServer; - // private readonly Thread m_assetCacheThread; + private readonly Thread m_assetCacheThread; /// /// Report statistical data. @@ -94,7 +94,7 @@ namespace OpenSim.Framework.Communications.Cache m_log.InfoFormat("Assets:{0} Textures:{1} RequestLists:{2}", Assets.Count, Textures.Count, - // AssetRequests.Count, + // AssetRequests.Count, // RequestedAssets.Count, RequestLists.Count); @@ -150,9 +150,9 @@ namespace OpenSim.Framework.Communications.Cache { Assets = new Dictionary(); Textures = new Dictionary(); - // AssetRequests = new List(); + AssetRequests = new List(); - // RequestedAssets = new Dictionary(); + RequestedAssets = new Dictionary(); RequestLists = new Dictionary(); } @@ -168,18 +168,18 @@ namespace OpenSim.Framework.Communications.Cache m_assetServer = assetServer; m_assetServer.SetReceiver(this); - // m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); - // m_assetCacheThread.Name = "AssetCacheThread"; - // m_assetCacheThread.IsBackground = true; - // m_assetCacheThread.Start(); - // OpenSim.Framework.ThreadTracker.Add(m_assetCacheThread); + m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); + m_assetCacheThread.Name = "AssetCacheThread"; + m_assetCacheThread.IsBackground = true; + m_assetCacheThread.Start(); + OpenSim.Framework.ThreadTracker.Add(m_assetCacheThread); } /// /// Process the asset queue which holds data which is packeted up and sent /// directly back to the client. /// - /* public void RunAssetManager() + public void RunAssetManager() { while (true) { @@ -193,7 +193,7 @@ namespace OpenSim.Framework.Communications.Cache m_log.Error("[ASSET CACHE]: " + e.ToString()); } } - }*/ + } /// /// Only get an asset if we already have it in the cache. @@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications.Cache StatsManager.SimExtraStats.AddAsset(assetInf); } - /* if (RequestedAssets.ContainsKey(assetInf.FullID)) + if (RequestedAssets.ContainsKey(assetInf.FullID)) { #if DEBUG //m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID); @@ -461,7 +461,7 @@ namespace OpenSim.Framework.Communications.Cache RequestedAssets.Remove(assetInf.FullID); AssetRequests.Add(req); - }*/ + } } } @@ -485,6 +485,7 @@ namespace OpenSim.Framework.Communications.Cache //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding // the lock in the texturedownload module) was trying to //request a new asset and hitting a lock in here on the RequestLists. + List theseRequests = new List(reqList.Requests); reqList.Requests.Clear(); @@ -541,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache } - /* + /// /// Calculate the number of packets required to send the asset to the client. /// @@ -735,7 +736,7 @@ namespace OpenSim.Framework.Communications.Cache { } } - */ + public class AssetInfo : AssetBase { -- cgit v1.1