diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 29c7059fbd..35a00885fd 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 { diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 55c5726325..aa7db95bee 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -3564,12 +3564,12 @@ namespace OpenSim.Region.ClientStack case PacketType.TransferRequest: //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request"); TransferRequestPacket transfer = (TransferRequestPacket)Pack; - // m_assetCache.AddAssetRequest(this, transfer); - handler094 = OnRequestAsset; + m_assetCache.AddAssetRequest(this, transfer); + /* handler094 = OnRequestAsset; if (handler094 != null) { handler094(this, transfer); - } + }*/ break; case PacketType.AssetUploadRequest: AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs index ca01cae305..f53be4157c 100644 --- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs @@ -65,17 +65,17 @@ namespace OpenSim.Region.Environment.Modules if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) { RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); - scene.EventManager.OnNewClient += NewClient; + // scene.EventManager.OnNewClient += NewClient; } if (m_scene == null) { m_scene = scene; - m_thread = new Thread(new ThreadStart(RunAssetQueue)); - m_thread.Name = "AssetDownloadQueueThread"; - m_thread.IsBackground = true; - m_thread.Start(); - OpenSim.Framework.ThreadTracker.Add(m_thread); + // m_thread = new Thread(new ThreadStart(RunAssetQueue)); + // m_thread.Name = "AssetDownloadQueueThread"; + // m_thread.IsBackground = true; + // m_thread.Start(); + // OpenSim.Framework.ThreadTracker.Add(m_thread); } } @@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules public void NewClient(IClientAPI client) { - client.OnRequestAsset += AddAssetRequest; + // client.OnRequestAsset += AddAssetRequest; } ///