aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs20
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs10
2 files changed, 16 insertions, 14 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 0d85345..0e31e95 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -44,8 +44,8 @@ namespace OpenSim.Framework.Communications.Cache
44 /// 44 ///
45 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either 45 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either
46 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and 46 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
47 /// sends packetised data directly back to the client. The only point where they meets is AssetReceived() and 47 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
48 /// AssetNotFound(). 48 /// AssetNotFound(), which means they do share the same asset and texture caches.
49 /// 49 ///
50 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age). 50 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age).
51 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets 51 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets
@@ -469,7 +469,7 @@ namespace OpenSim.Framework.Communications.Cache
469 469
470 // Notify requesters for this asset 470 // Notify requesters for this asset
471 if (RequestLists.ContainsKey(asset.FullID)) 471 if (RequestLists.ContainsKey(asset.FullID))
472 { 472 {
473 lock (RequestLists) 473 lock (RequestLists)
474 { 474 {
475 AssetRequestsList reqList = RequestLists[asset.FullID]; 475 AssetRequestsList reqList = RequestLists[asset.FullID];
@@ -513,14 +513,16 @@ namespace OpenSim.Framework.Communications.Cache
513 // Notify requesters for this asset 513 // Notify requesters for this asset
514 lock (RequestLists) 514 lock (RequestLists)
515 { 515 {
516 AssetRequestsList reqList = RequestLists[assetID]; 516 if (RequestLists.ContainsKey(assetID))
517 foreach (NewAssetRequest req in reqList.Requests)
518 { 517 {
519 req.Callback(assetID, null); 518 AssetRequestsList reqList = RequestLists[assetID];
519 foreach (NewAssetRequest req in reqList.Requests)
520 {
521 req.Callback(assetID, null);
522 }
523
524 RequestLists.Remove(assetID);
520 } 525 }
521
522 RequestLists.Remove(assetID);
523 reqList.Requests.Clear();
524 } 526 }
525 } 527 }
526 528
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index b6ec898..a3530bd 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.Communications.Cache
77 } 77 }
78 else 78 else
79 { 79 {
80 m_log.ErrorFormat("[ASSETSERVER]: Asset {0} not found by asset server", req.AssetID); 80 m_log.ErrorFormat("[ASSET SERVER]: Asset {0} not found by asset server", req.AssetID);
81 81
82 m_receiver.AssetNotFound(req.AssetID); 82 m_receiver.AssetNotFound(req.AssetID);
83 } 83 }
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.Communications.Cache
85 85
86 public virtual void LoadDefaultAssets() 86 public virtual void LoadDefaultAssets()
87 { 87 {
88 m_log.Info("[ASSETSERVER]: Setting up asset database"); 88 m_log.Info("[ASSET SERVER]: Setting up asset database");
89 89
90 assetLoader.ForEachDefaultXmlAsset(StoreAsset); 90 assetLoader.ForEachDefaultXmlAsset(StoreAsset);
91 91
@@ -94,7 +94,7 @@ namespace OpenSim.Framework.Communications.Cache
94 94
95 public AssetServerBase() 95 public AssetServerBase()
96 { 96 {
97 m_log.Info("[ASSETSERVER]: Starting asset storage system"); 97 m_log.Info("[ASSET SERVER]: Starting asset storage system");
98 m_assetRequests = new BlockingQueue<AssetRequest>(); 98 m_assetRequests = new BlockingQueue<AssetRequest>();
99 99
100 m_localAssetServerThread = new Thread(RunRequests); 100 m_localAssetServerThread = new Thread(RunRequests);
@@ -115,7 +115,7 @@ namespace OpenSim.Framework.Communications.Cache
115 } 115 }
116 catch (Exception e) 116 catch (Exception e)
117 { 117 {
118 m_log.Error("[ASSETSERVER]: " + e.Message); 118 m_log.Error("[ASSET SERVER]: " + e.ToString());
119 } 119 }
120 } 120 }
121 } 121 }
@@ -136,7 +136,7 @@ namespace OpenSim.Framework.Communications.Cache
136 req.IsTexture = isTexture; 136 req.IsTexture = isTexture;
137 m_assetRequests.Enqueue(req); 137 m_assetRequests.Enqueue(req);
138 138
139 m_log.InfoFormat("[ASSETSERVER]: Added {0} to request queue", assetID); 139 m_log.InfoFormat("[ASSET SERVER]: Added {0} to request queue", assetID);
140 } 140 }
141 141
142 public virtual void UpdateAsset(AssetBase asset) 142 public virtual void UpdateAsset(AssetBase asset)