From 095dbf0ece0aab1812d04695a17bff86720ab6ac Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Jun 2012 20:35:00 +0200 Subject: Fix not sending TransferInfo when an asset is not found. This clogs up the sound pipeline in the viewer. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 77dbca7..5a87958 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2777,6 +2777,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendAssetNotFound(AssetRequestToClient req) + { + TransferInfoPacket Transfer = new TransferInfoPacket(); + Transfer.TransferInfo.ChannelType = 2; + Transfer.TransferInfo.Status = -2; + Transfer.TransferInfo.TargetType = 0; + Transfer.TransferInfo.Params = req.Params; + Transfer.TransferInfo.Size = 0; + Transfer.TransferInfo.TransferID = req.TransferRequestID; + Transfer.Header.Zerocoded = true; + OutPacket(Transfer, ThrottleOutPacketType.Asset); + } + public void SendTexture(AssetBase TextureAsset) { @@ -12178,14 +12191,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected void AssetReceived(string id, Object sender, AssetBase asset) { - if (asset == null) - return; - TransferRequestPacket transferRequest = (TransferRequestPacket)sender; UUID requestID = UUID.Zero; byte source = (byte)SourceType.Asset; + AssetRequestToClient req = new AssetRequestToClient(); + + if (asset == null) + { + req.AssetInf = null; + req.AssetRequestSource = source; + req.IsTextureRequest = false; + req.NumPackets = 0; + req.Params = transferRequest.TransferInfo.Params; + req.RequestAssetID = requestID; + req.TransferRequestID = transferRequest.TransferInfo.TransferID; + + SendAssetNotFound(req); + return; + } + if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) { requestID = new UUID(transferRequest.TransferInfo.Params, 0); @@ -12202,7 +12228,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; // The asset is known to exist and is in our cache, so add it to the AssetRequests list - AssetRequestToClient req = new AssetRequestToClient(); req.AssetInf = asset; req.AssetRequestSource = source; req.IsTextureRequest = false; -- cgit v1.1