diff options
author | Justin Clarke Casey | 2007-12-19 18:05:45 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2007-12-19 18:05:45 +0000 |
commit | 45567b71b8c3c6f2e52dacdda92671048bb3faf0 (patch) | |
tree | 97f6f09bfb255181cf1ae964f1ac09d61bc615c7 /OpenSim/Framework/Communications/Cache/GridAssetClient.cs | |
parent | Stopped module loader from re-loading .dll once for every plugin found within... (diff) | |
download | opensim-SC-45567b71b8c3c6f2e52dacdda92671048bb3faf0.zip opensim-SC-45567b71b8c3c6f2e52dacdda92671048bb3faf0.tar.gz opensim-SC-45567b71b8c3c6f2e52dacdda92671048bb3faf0.tar.bz2 opensim-SC-45567b71b8c3c6f2e52dacdda92671048bb3faf0.tar.xz |
Refactor asset request processing for consistent status information on whether an asset was actually found or not
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/GridAssetClient.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/GridAssetClient.cs | 14 |
1 files changed, 5 insertions, 9 deletions
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 | |||
47 | 47 | ||
48 | #region IAssetServer Members | 48 | #region IAssetServer Members |
49 | 49 | ||
50 | protected override void ProcessRequest(AssetRequest req) | 50 | protected override AssetBase _ProcessRequest(AssetRequest req) |
51 | { | 51 | { |
52 | Stream s = null; | 52 | Stream s = null; |
53 | try | 53 | try |
@@ -66,14 +66,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
66 | if (s.Length > 0) | 66 | if (s.Length > 0) |
67 | { | 67 | { |
68 | XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); | 68 | XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); |
69 | AssetBase newAsset = (AssetBase)xs.Deserialize(s); | 69 | |
70 | 70 | return (AssetBase)xs.Deserialize(s); | |
71 | _receiver.AssetReceived(newAsset, req.IsTexture); | ||
72 | } | ||
73 | else | ||
74 | { | ||
75 | MainLog.Instance.Debug("ASSETCACHE", "Asset not found {0}", req.AssetID.ToString()); | ||
76 | _receiver.AssetNotFound(req.AssetID); | ||
77 | } | 71 | } |
78 | } | 72 | } |
79 | catch (Exception e) | 73 | catch (Exception e) |
@@ -82,6 +76,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
82 | MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); | 76 | MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); |
83 | MainLog.Instance.Error("ASSETCACHE", e.StackTrace); | 77 | MainLog.Instance.Error("ASSETCACHE", e.StackTrace); |
84 | } | 78 | } |
79 | |||
80 | return null; | ||
85 | } | 81 | } |
86 | 82 | ||
87 | 83 | ||