From 45567b71b8c3c6f2e52dacdda92671048bb3faf0 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 19 Dec 2007 18:05:45 +0000 Subject: Refactor asset request processing for consistent status information on whether an asset was actually found or not --- OpenSim/Framework/Communications/Cache/GridAssetClient.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/GridAssetClient.cs') diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 47104d7..5801aa8 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs @@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Cache #region IAssetServer Members - protected override void ProcessRequest(AssetRequest req) + protected override AssetBase _ProcessRequest(AssetRequest req) { Stream s = null; try @@ -66,14 +66,8 @@ namespace OpenSim.Framework.Communications.Cache if (s.Length > 0) { XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); - AssetBase newAsset = (AssetBase)xs.Deserialize(s); - - _receiver.AssetReceived(newAsset, req.IsTexture); - } - else - { - MainLog.Instance.Debug("ASSETCACHE", "Asset not found {0}", req.AssetID.ToString()); - _receiver.AssetNotFound(req.AssetID); + + return (AssetBase)xs.Deserialize(s); } } catch (Exception e) @@ -82,6 +76,8 @@ namespace OpenSim.Framework.Communications.Cache MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); MainLog.Instance.Error("ASSETCACHE", e.StackTrace); } + + return null; } -- cgit v1.1