* Refactored some asset code and in the process uncovered a bug; now, I think first transfer of asset should start faster.

ThreadPoolClientBranch
lbsa71 2008-02-09 22:23:36 +00:00
parent d2e66872ed
commit 7486762aa0
1 changed files with 16 additions and 12 deletions

View File

@ -81,6 +81,9 @@ namespace OpenSim.Framework.Communications.Cache
long imageBytes = 0;
long assetBytes = 0;
foreach (TextureImage texture in Textures.Values)
{
if (texture.Temporary)
@ -201,22 +204,23 @@ namespace OpenSim.Framework.Communications.Cache
else
{
NewAssetRequest req = new NewAssetRequest(assetID, callback);
if (RequestLists.ContainsKey(assetID))
{
AssetRequestsList requestList;
lock (RequestLists)
{
RequestLists[assetID].Requests.Add(req);
}
if (RequestLists.TryGetValue(assetID, out requestList))
{
}
else
{
AssetRequestsList reqList = new AssetRequestsList(assetID);
reqList.Requests.Add(req);
lock (RequestLists)
{
RequestLists.Add(assetID, reqList);
requestList = new AssetRequestsList(assetID);
RequestLists.Add(assetID, requestList);
}
}
requestList.Requests.Add(req);
m_assetServer.RequestAsset(assetID, false);
}
}