aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs35
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/AssetDownloadModule.cs14
3 files changed, 28 insertions, 27 deletions
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
69 /// 69 ///
70 /// Assets requests which are waiting for asset server data. This includes texture requests 70 /// Assets requests which are waiting for asset server data. This includes texture requests
71 /// </summary> 71 /// </summary>
72 // private Dictionary<LLUUID, AssetRequest> RequestedAssets; 72 private Dictionary<LLUUID, AssetRequest> RequestedAssets;
73 73
74 /// <summary> 74 /// <summary>
75 /// Asset requests with data which are ready to be sent back to requesters. This includes textures. 75 /// Asset requests with data which are ready to be sent back to requesters. This includes textures.
76 /// </summary> 76 /// </summary>
77 // private List<AssetRequest> AssetRequests; 77 private List<AssetRequest> AssetRequests;
78 78
79 79
80 /// <summary> 80 /// <summary>
@@ -84,7 +84,7 @@ namespace OpenSim.Framework.Communications.Cache
84 84
85 private readonly IAssetServer m_assetServer; 85 private readonly IAssetServer m_assetServer;
86 86
87 // private readonly Thread m_assetCacheThread; 87 private readonly Thread m_assetCacheThread;
88 88
89 /// <summary> 89 /// <summary>
90 /// Report statistical data. 90 /// Report statistical data.
@@ -94,7 +94,7 @@ namespace OpenSim.Framework.Communications.Cache
94 m_log.InfoFormat("Assets:{0} Textures:{1} RequestLists:{2}", 94 m_log.InfoFormat("Assets:{0} Textures:{1} RequestLists:{2}",
95 Assets.Count, 95 Assets.Count,
96 Textures.Count, 96 Textures.Count,
97 // AssetRequests.Count, 97 // AssetRequests.Count,
98 // RequestedAssets.Count, 98 // RequestedAssets.Count,
99 RequestLists.Count); 99 RequestLists.Count);
100 100
@@ -150,9 +150,9 @@ namespace OpenSim.Framework.Communications.Cache
150 { 150 {
151 Assets = new Dictionary<LLUUID, AssetInfo>(); 151 Assets = new Dictionary<LLUUID, AssetInfo>();
152 Textures = new Dictionary<LLUUID, TextureImage>(); 152 Textures = new Dictionary<LLUUID, TextureImage>();
153 // AssetRequests = new List<AssetRequest>(); 153 AssetRequests = new List<AssetRequest>();
154 154
155 // RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); 155 RequestedAssets = new Dictionary<LLUUID, AssetRequest>();
156 RequestLists = new Dictionary<LLUUID, AssetRequestsList>(); 156 RequestLists = new Dictionary<LLUUID, AssetRequestsList>();
157 } 157 }
158 158
@@ -168,18 +168,18 @@ namespace OpenSim.Framework.Communications.Cache
168 m_assetServer = assetServer; 168 m_assetServer = assetServer;
169 m_assetServer.SetReceiver(this); 169 m_assetServer.SetReceiver(this);
170 170
171 // m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); 171 m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
172 // m_assetCacheThread.Name = "AssetCacheThread"; 172 m_assetCacheThread.Name = "AssetCacheThread";
173 // m_assetCacheThread.IsBackground = true; 173 m_assetCacheThread.IsBackground = true;
174 // m_assetCacheThread.Start(); 174 m_assetCacheThread.Start();
175 // OpenSim.Framework.ThreadTracker.Add(m_assetCacheThread); 175 OpenSim.Framework.ThreadTracker.Add(m_assetCacheThread);
176 } 176 }
177 177
178 /// <summary> 178 /// <summary>
179 /// Process the asset queue which holds data which is packeted up and sent 179 /// Process the asset queue which holds data which is packeted up and sent
180 /// directly back to the client. 180 /// directly back to the client.
181 /// </summary> 181 /// </summary>
182 /* public void RunAssetManager() 182 public void RunAssetManager()
183 { 183 {
184 while (true) 184 while (true)
185 { 185 {
@@ -193,7 +193,7 @@ namespace OpenSim.Framework.Communications.Cache
193 m_log.Error("[ASSET CACHE]: " + e.ToString()); 193 m_log.Error("[ASSET CACHE]: " + e.ToString());
194 } 194 }
195 } 195 }
196 }*/ 196 }
197 197
198 /// <summary> 198 /// <summary>
199 /// Only get an asset if we already have it in the cache. 199 /// Only get an asset if we already have it in the cache.
@@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications.Cache
449 StatsManager.SimExtraStats.AddAsset(assetInf); 449 StatsManager.SimExtraStats.AddAsset(assetInf);
450 } 450 }
451 451
452 /* if (RequestedAssets.ContainsKey(assetInf.FullID)) 452 if (RequestedAssets.ContainsKey(assetInf.FullID))
453 { 453 {
454 #if DEBUG 454 #if DEBUG
455 //m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID); 455 //m_log.DebugFormat("[ASSET CACHE]: Moving {0} from RequestedAssets to AssetRequests", asset.FullID);
@@ -461,7 +461,7 @@ namespace OpenSim.Framework.Communications.Cache
461 461
462 RequestedAssets.Remove(assetInf.FullID); 462 RequestedAssets.Remove(assetInf.FullID);
463 AssetRequests.Add(req); 463 AssetRequests.Add(req);
464 }*/ 464 }
465 } 465 }
466 } 466 }
467 467
@@ -485,6 +485,7 @@ namespace OpenSim.Framework.Communications.Cache
485 //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding 485 //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding
486 // the lock in the texturedownload module) was trying to 486 // the lock in the texturedownload module) was trying to
487 //request a new asset and hitting a lock in here on the RequestLists. 487 //request a new asset and hitting a lock in here on the RequestLists.
488
488 List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests); 489 List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests);
489 reqList.Requests.Clear(); 490 reqList.Requests.Clear();
490 491
@@ -541,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
541 542
542 } 543 }
543 544
544 /* 545
545 /// <summary> 546 /// <summary>
546 /// Calculate the number of packets required to send the asset to the client. 547 /// Calculate the number of packets required to send the asset to the client.
547 /// </summary> 548 /// </summary>
@@ -735,7 +736,7 @@ namespace OpenSim.Framework.Communications.Cache
735 { 736 {
736 } 737 }
737 } 738 }
738 */ 739
739 740
740 public class AssetInfo : AssetBase 741 public class AssetInfo : AssetBase
741 { 742 {
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 55c5726..aa7db95 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -3564,12 +3564,12 @@ namespace OpenSim.Region.ClientStack
3564 case PacketType.TransferRequest: 3564 case PacketType.TransferRequest:
3565 //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request"); 3565 //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
3566 TransferRequestPacket transfer = (TransferRequestPacket)Pack; 3566 TransferRequestPacket transfer = (TransferRequestPacket)Pack;
3567 // m_assetCache.AddAssetRequest(this, transfer); 3567 m_assetCache.AddAssetRequest(this, transfer);
3568 handler094 = OnRequestAsset; 3568 /* handler094 = OnRequestAsset;
3569 if (handler094 != null) 3569 if (handler094 != null)
3570 { 3570 {
3571 handler094(this, transfer); 3571 handler094(this, transfer);
3572 } 3572 }*/
3573 break; 3573 break;
3574 case PacketType.AssetUploadRequest: 3574 case PacketType.AssetUploadRequest:
3575 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 3575 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
index ca01cae..f53be41 100644
--- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
@@ -65,17 +65,17 @@ namespace OpenSim.Region.Environment.Modules
65 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) 65 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
66 { 66 {
67 RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); 67 RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
68 scene.EventManager.OnNewClient += NewClient; 68 // scene.EventManager.OnNewClient += NewClient;
69 } 69 }
70 70
71 if (m_scene == null) 71 if (m_scene == null)
72 { 72 {
73 m_scene = scene; 73 m_scene = scene;
74 m_thread = new Thread(new ThreadStart(RunAssetQueue)); 74 // m_thread = new Thread(new ThreadStart(RunAssetQueue));
75 m_thread.Name = "AssetDownloadQueueThread"; 75 // m_thread.Name = "AssetDownloadQueueThread";
76 m_thread.IsBackground = true; 76 // m_thread.IsBackground = true;
77 m_thread.Start(); 77 // m_thread.Start();
78 OpenSim.Framework.ThreadTracker.Add(m_thread); 78 // OpenSim.Framework.ThreadTracker.Add(m_thread);
79 } 79 }
80 } 80 }
81 81
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules
99 99
100 public void NewClient(IClientAPI client) 100 public void NewClient(IClientAPI client)
101 { 101 {
102 client.OnRequestAsset += AddAssetRequest; 102 // client.OnRequestAsset += AddAssetRequest;
103 } 103 }
104 104
105 /// <summary> 105 /// <summary>