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.

avinationmerge
Tom Grimshaw 2010-06-27 22:23:01 -07:00
parent ef0ac7c403
commit 827d9be48f
1 changed files with 15 additions and 1 deletions

View File

@ -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);
}
}
/// <summary>