From 4c6e5a5090f847aa8944bd06168b45af8fcec3bf Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 20 Feb 2008 13:11:19 +0000 Subject: * re-enabled AssetNotFound code * turned script asset fetching asynchronous --- .../Framework/Communications/Cache/AssetCache.cs | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 0904823..dacb321 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -457,21 +457,22 @@ namespace OpenSim.Framework.Communications.Cache public void AssetNotFound(LLUUID assetID) { - m_log.ErrorFormat("[ASSET CACHE]: Unhandled AssetNotFound for {0}", assetID); - - //if (this.RequestedTextures.ContainsKey(assetID)) - //{ - // m_log.WarnFormat("[ASSET CACHE]: sending image not found for {0}", assetID); - // AssetRequest req = this.RequestedTextures[assetID]; - // ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); - // notFound.ImageID.ID = assetID; - // req.RequestUser.OutPacket(notFound); - // this.RequestedTextures.Remove(assetID); - //} - //else - //{ - // m_log.ErrorFormat("[ASSET CACHE]: Cound not send image not found for {0}", assetID); - //} + //m_log.ErrorFormat("[ASSET CACHE]: Unhandled AssetNotFound for {0}", assetID); + + AssetRequest req; + + if (RequestedTextures.TryGetValue(assetID, out req)) + { + m_log.WarnFormat("[ASSET CACHE]: sending image not found for {0}", assetID); + ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); + notFound.ImageID.ID = assetID; + req.RequestUser.OutPacket(notFound, ThrottleOutPacketType.Unknown); + RequestedTextures.Remove(assetID); + } + else + { + m_log.ErrorFormat("[ASSET CACHE]: Asset [{0}] not found, but couldn't find any users to send to ", assetID); + } } private int CalculateNumPackets(byte[] data) -- cgit v1.1