diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetCache.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetCache.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 32ba830..0c6d971 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -350,7 +350,6 @@ namespace OpenSim.Framework.Communications.Caches | |||
350 | Transfer.TransferInfo.TargetType = 0; | 350 | Transfer.TransferInfo.TargetType = 0; |
351 | if (req.AssetRequestSource == 2) | 351 | if (req.AssetRequestSource == 2) |
352 | { | 352 | { |
353 | //Transfer.TransferInfo.Params = req.Params; | ||
354 | Transfer.TransferInfo.Params = new byte[20]; | 353 | Transfer.TransferInfo.Params = new byte[20]; |
355 | Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); | 354 | Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); |
356 | int assType = (int)req.AssetInf.Type; | 355 | int assType = (int)req.AssetInf.Type; |
@@ -389,19 +388,19 @@ namespace OpenSim.Framework.Communications.Caches | |||
389 | { | 388 | { |
390 | chunk = new byte[req.AssetInf.Data.Length]; | 389 | chunk = new byte[req.AssetInf.Data.Length]; |
391 | Array.Copy(req.AssetInf.Data, chunk, req.AssetInf.Data.Length); | 390 | Array.Copy(req.AssetInf.Data, chunk, req.AssetInf.Data.Length); |
391 | TransferPacket.TransferData.Data = chunk; | ||
392 | TransferPacket.TransferData.Status = 1; | ||
393 | req.RequestUser.OutPacket(TransferPacket); | ||
392 | } | 394 | } |
393 | else | 395 | else |
394 | { | 396 | { |
395 | chunk = new byte[1000]; | 397 | chunk = new byte[1000]; |
396 | Array.Copy(req.AssetInf.Data, chunk, 1000); | 398 | Array.Copy(req.AssetInf.Data, chunk, 1000); |
397 | } | ||
398 | 399 | ||
399 | TransferPacket.TransferData.Data = chunk; | 400 | TransferPacket.TransferData.Data = chunk; |
400 | TransferPacket.TransferData.Status = 0; | 401 | TransferPacket.TransferData.Status = 0; |
401 | req.RequestUser.OutPacket(TransferPacket); | 402 | req.RequestUser.OutPacket(TransferPacket); |
402 | 403 | ||
403 | if (req.AssetInf.Data.Length > 1000) | ||
404 | { | ||
405 | TransferPacket = new TransferPacketPacket(); | 404 | TransferPacket = new TransferPacketPacket(); |
406 | TransferPacket.TransferData.Packet = 1; | 405 | TransferPacket.TransferData.Packet = 1; |
407 | TransferPacket.TransferData.ChannelType = 2; | 406 | TransferPacket.TransferData.ChannelType = 2; |
@@ -411,7 +410,7 @@ namespace OpenSim.Framework.Communications.Caches | |||
411 | TransferPacket.TransferData.Data = chunk1; | 410 | TransferPacket.TransferData.Data = chunk1; |
412 | TransferPacket.TransferData.Status = 1; | 411 | TransferPacket.TransferData.Status = 1; |
413 | req.RequestUser.OutPacket(TransferPacket); | 412 | req.RequestUser.OutPacket(TransferPacket); |
414 | } | 413 | } |
415 | } | 414 | } |
416 | 415 | ||
417 | } | 416 | } |