diff options
author | Melanie Thielker | 2017-02-01 16:31:01 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-02-01 16:31:01 +0000 |
commit | a5151bb337cfee14dff6045d7f8e293201ae94ac (patch) | |
tree | f301338415da7160e48efcb4dc6cd1efc7faecaf /OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |
parent | Secure sim stats with an (optional) password. (diff) | |
download | opensim-SC-a5151bb337cfee14dff6045d7f8e293201ae94ac.zip opensim-SC-a5151bb337cfee14dff6045d7f8e293201ae94ac.tar.gz opensim-SC-a5151bb337cfee14dff6045d7f8e293201ae94ac.tar.bz2 opensim-SC-a5151bb337cfee14dff6045d7f8e293201ae94ac.tar.xz |
Refactor asset handling as per Ubit's suggestion
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 20 |
1 files changed, 8 insertions, 12 deletions
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 | |||
136 | // Cache fetch | 136 | // Cache fetch |
137 | if (m_cache != null) | 137 | if (m_cache != null) |
138 | { | 138 | { |
139 | bool negative; | 139 | AssetBase asset; |
140 | AssetBase asset = m_cache.Get(id, out negative); | 140 | if (!m_cache.Get(id, out asset)) |
141 | if (negative) | ||
142 | return null; | 141 | return null; |
143 | if (asset != null) | 142 | if (asset != null) |
144 | return asset; | 143 | return asset; |
@@ -150,9 +149,9 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
150 | 149 | ||
151 | public AssetBase GetCached(string id) | 150 | public AssetBase GetCached(string id) |
152 | { | 151 | { |
153 | bool negative; | 152 | AssetBase asset; |
154 | if (m_cache != null) | 153 | if (m_cache != null) |
155 | return m_cache.Get(id, out negative); | 154 | m_cache.Get(id, out asset); |
156 | 155 | ||
157 | return null; | 156 | return null; |
158 | } | 157 | } |
@@ -173,9 +172,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
173 | // Cache fetch | 172 | // Cache fetch |
174 | if (m_cache != null) | 173 | if (m_cache != null) |
175 | { | 174 | { |
176 | bool negative; | 175 | AssetBase asset; |
177 | AssetBase asset = m_cache.Get(id, out negative); | 176 | if (!m_cache.Get(id, out asset)) |
178 | if (negative) | ||
179 | return null; | 177 | return null; |
180 | if (asset != null) | 178 | if (asset != null) |
181 | return asset.Metadata; | 179 | return asset.Metadata; |
@@ -219,10 +217,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
219 | // Cache fetch | 217 | // Cache fetch |
220 | if (m_cache != null) | 218 | if (m_cache != null) |
221 | { | 219 | { |
222 | bool negative; | 220 | AssetBase asset; |
223 | AssetBase asset = m_cache.Get(id, out negative); | 221 | if (!m_cache.Get(id, out asset)) |
224 | |||
225 | if (negative) | ||
226 | return false; | 222 | return false; |
227 | 223 | ||
228 | if (asset != null) | 224 | if (asset != null) |