aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorlbsa712008-02-09 22:23:36 +0000
committerlbsa712008-02-09 22:23:36 +0000
commit7486762aa08d67576f44a4c476b9db1dc52a5b09 (patch)
tree315fc318b93eca611db8550a0dcdfbca4d5b1d61 /OpenSim/Framework/Communications
parent*Neb try this update. It might fix it.. it might also cause no parcel to ... (diff)
downloadopensim-SC_OLD-7486762aa08d67576f44a4c476b9db1dc52a5b09.zip
opensim-SC_OLD-7486762aa08d67576f44a4c476b9db1dc52a5b09.tar.gz
opensim-SC_OLD-7486762aa08d67576f44a4c476b9db1dc52a5b09.tar.bz2
opensim-SC_OLD-7486762aa08d67576f44a4c476b9db1dc52a5b09.tar.xz
* Refactored some asset code and in the process uncovered a bug; now, I think first transfer of asset should start faster.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 3e60ceb..5bc388a 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -81,6 +81,9 @@ namespace OpenSim.Framework.Communications.Cache
81 long imageBytes = 0; 81 long imageBytes = 0;
82 long assetBytes = 0; 82 long assetBytes = 0;
83 83
84
85
86
84 foreach (TextureImage texture in Textures.Values) 87 foreach (TextureImage texture in Textures.Values)
85 { 88 {
86 if (texture.Temporary) 89 if (texture.Temporary)
@@ -201,22 +204,23 @@ namespace OpenSim.Framework.Communications.Cache
201 else 204 else
202 { 205 {
203 NewAssetRequest req = new NewAssetRequest(assetID, callback); 206 NewAssetRequest req = new NewAssetRequest(assetID, callback);
204 if (RequestLists.ContainsKey(assetID)) 207
208 AssetRequestsList requestList;
209
210 lock (RequestLists)
205 { 211 {
206 lock (RequestLists) 212 if (RequestLists.TryGetValue(assetID, out requestList))
207 { 213 {
208 RequestLists[assetID].Requests.Add(req);
209 } 214 }
210 } 215 else
211 else
212 {
213 AssetRequestsList reqList = new AssetRequestsList(assetID);
214 reqList.Requests.Add(req);
215 lock (RequestLists)
216 { 216 {
217 RequestLists.Add(assetID, reqList); 217 requestList = new AssetRequestsList(assetID);
218 RequestLists.Add(assetID, requestList);
218 } 219 }
219 } 220 }
221
222 requestList.Requests.Add(req);
223
220 m_assetServer.RequestAsset(assetID, false); 224 m_assetServer.RequestAsset(assetID, false);
221 } 225 }
222 } 226 }