From a5151bb337cfee14dff6045d7f8e293201ae94ac Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 1 Feb 2017 16:31:01 +0000 Subject: Refactor asset handling as per Ubit's suggestion --- .../SimianGrid/SimianAssetServiceConnector.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index af5f69a..953bc2a 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -136,9 +136,8 @@ namespace OpenSim.Services.Connectors.SimianGrid // Cache fetch if (m_cache != null) { - bool negative; - AssetBase asset = m_cache.Get(id, out negative); - if (negative) + AssetBase asset; + if (!m_cache.Get(id, out asset)) return null; if (asset != null) return asset; @@ -150,9 +149,9 @@ namespace OpenSim.Services.Connectors.SimianGrid public AssetBase GetCached(string id) { - bool negative; + AssetBase asset; if (m_cache != null) - return m_cache.Get(id, out negative); + m_cache.Get(id, out asset); return null; } @@ -173,9 +172,8 @@ namespace OpenSim.Services.Connectors.SimianGrid // Cache fetch if (m_cache != null) { - bool negative; - AssetBase asset = m_cache.Get(id, out negative); - if (negative) + AssetBase asset; + if (!m_cache.Get(id, out asset)) return null; if (asset != null) return asset.Metadata; @@ -219,10 +217,8 @@ namespace OpenSim.Services.Connectors.SimianGrid // Cache fetch if (m_cache != null) { - bool negative; - AssetBase asset = m_cache.Get(id, out negative); - - if (negative) + AssetBase asset; + if (!m_cache.Get(id, out asset)) return false; if (asset != null) -- cgit v1.1