diff options
author | Melanie Thielker | 2017-02-01 16:34:07 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-02-01 16:34:07 +0000 |
commit | 60cf3f759fbadb3405ac7e266ddd13106ae3cbb2 (patch) | |
tree | d7a81b3ae935d9685f3c9faea0127f919f868a14 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset | |
parent | Refactor asset handling as per Ubit's suggestion (diff) | |
download | opensim-SC-60cf3f759fbadb3405ac7e266ddd13106ae3cbb2.zip opensim-SC-60cf3f759fbadb3405ac7e266ddd13106ae3cbb2.tar.gz opensim-SC-60cf3f759fbadb3405ac7e266ddd13106ae3cbb2.tar.bz2 opensim-SC-60cf3f759fbadb3405ac7e266ddd13106ae3cbb2.tar.xz |
Refactor part II
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index 2fe9733..37a48bb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -218,9 +218,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
218 | 218 | ||
219 | if (m_Cache != null) | 219 | if (m_Cache != null) |
220 | { | 220 | { |
221 | bool negative; | 221 | if (!m_Cache.Get(id, out asset)) |
222 | asset = m_Cache.Get(id, out negative); | ||
223 | if (negative) | ||
224 | return null; | 222 | return null; |
225 | } | 223 | } |
226 | 224 | ||
@@ -244,10 +242,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
244 | 242 | ||
245 | if (m_Cache != null) | 243 | if (m_Cache != null) |
246 | { | 244 | { |
247 | bool negative; | 245 | AssetBase asset; |
248 | AssetBase asset = m_Cache.Get(id, out negative); | 246 | if (!m_Cache.Get(id, out asset)) |
249 | |||
250 | if (negative) | ||
251 | return false; | 247 | return false; |
252 | 248 | ||
253 | if (asset != null) | 249 | if (asset != null) |
@@ -302,9 +298,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
302 | public bool UpdateContent(string id, byte[] data) | 298 | public bool UpdateContent(string id, byte[] data) |
303 | { | 299 | { |
304 | AssetBase asset = null; | 300 | AssetBase asset = null; |
305 | bool negative; | ||
306 | if (m_Cache != null) | 301 | if (m_Cache != null) |
307 | m_Cache.Get(id, out negative); | 302 | m_Cache.Get(id, out asset); |
308 | if (asset != null) | 303 | if (asset != null) |
309 | { | 304 | { |
310 | asset.Data = data; | 305 | asset.Data = data; |