From 827d9be48f8177b5975df68208a8cf7c730b58f0 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Sun, 27 Jun 2010 22:23:01 -0700 Subject: Fix the sound issue. It was caused by missing assets; once the client has made one request, it continued to wait for asset before requesting any new ones, until the TransferRequest timed out. Fixed by adding a TransferAbortPacket if the asset cannot be retrieved. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f071841..5b5dc1e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2208,6 +2208,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(sound, ThrottleOutPacketType.Task); } + public void SendTransferAbort(TransferRequestPacket transferRequest) + { + TransferAbortPacket abort = (TransferAbortPacket)PacketPool.Instance.GetPacket(PacketType.TransferAbort); + abort.TransferInfo.TransferID = transferRequest.TransferInfo.TransferID; + abort.TransferInfo.ChannelType = transferRequest.TransferInfo.ChannelType; + m_log.Debug("[Assets] Aborting transfer; asset request failed"); + OutPacket(abort, ThrottleOutPacketType.Task); + } + public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) { SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger); @@ -11502,7 +11511,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); - m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived); + if (!m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived)) + { + //We need to send a TransferAbort here, so the client doesn't wait forever for the asset, + //which causes it to not request any more for a while. Which is bad. + SendTransferAbort(transferRequest); + } } /// -- cgit v1.1