diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index f214e19..7d25ca9 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -515,7 +515,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
515 | req.Params = transferRequest.TransferInfo.Params; | 515 | req.Params = transferRequest.TransferInfo.Params; |
516 | req.AssetInf = new AssetInfo(asset); | 516 | req.AssetInf = new AssetInfo(asset); |
517 | req.NumPackets = CalculateNumPackets(asset.Data); | 517 | req.NumPackets = CalculateNumPackets(asset.Data); |
518 | lock (AssetRequests) AssetRequests.Add(req); | 518 | lock (AssetRequests) |
519 | { | ||
520 | AssetRequests.Add(req); | ||
521 | } | ||
519 | } | 522 | } |
520 | 523 | ||
521 | /// <summary> | 524 | /// <summary> |
@@ -536,26 +539,25 @@ namespace OpenSim.Framework.Communications.Cache | |||
536 | AssetRequest req; | 539 | AssetRequest req; |
537 | AssetRequestToClient req2 = new AssetRequestToClient(); | 540 | AssetRequestToClient req2 = new AssetRequestToClient(); |
538 | 541 | ||
539 | for (int i = 0; i < num; i++) | 542 | lock (AssetRequests) |
540 | { | 543 | { |
541 | lock (AssetRequests) | 544 | for (int i = 0; i < num; i++) |
542 | { | 545 | { |
543 | req = AssetRequests[0]; | 546 | req = AssetRequests[0]; |
544 | AssetRequests.RemoveAt(0); | 547 | AssetRequests.RemoveAt(0); |
548 | req2.AssetInf = req.AssetInf; | ||
549 | req2.AssetRequestSource = req.AssetRequestSource; | ||
550 | req2.DataPointer = req.DataPointer; | ||
551 | req2.DiscardLevel = req.DiscardLevel; | ||
552 | req2.ImageInfo = req.ImageInfo; | ||
553 | req2.IsTextureRequest = req.IsTextureRequest; | ||
554 | req2.NumPackets = req.NumPackets; | ||
555 | req2.PacketCounter = req.PacketCounter; | ||
556 | req2.Params = req.Params; | ||
557 | req2.RequestAssetID = req.RequestAssetID; | ||
558 | req2.TransferRequestID = req.TransferRequestID; | ||
559 | req.RequestUser.SendAsset(req2); | ||
545 | } | 560 | } |
546 | |||
547 | req2.AssetInf = req.AssetInf; | ||
548 | req2.AssetRequestSource = req.AssetRequestSource; | ||
549 | req2.DataPointer = req.DataPointer; | ||
550 | req2.DiscardLevel = req.DiscardLevel; | ||
551 | req2.ImageInfo = req.ImageInfo; | ||
552 | req2.IsTextureRequest = req.IsTextureRequest; | ||
553 | req2.NumPackets = req.NumPackets; | ||
554 | req2.PacketCounter = req.PacketCounter; | ||
555 | req2.Params = req.Params; | ||
556 | req2.RequestAssetID = req.RequestAssetID; | ||
557 | req2.TransferRequestID = req.TransferRequestID; | ||
558 | req.RequestUser.SendAsset(req2); | ||
559 | } | 561 | } |
560 | } | 562 | } |
561 | 563 | ||