diff options
author | Oren Hurvitz | 2014-04-18 16:21:59 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-20 06:23:38 +0100 |
commit | 3f76f721372496011efc9328783f9f446b91a92b (patch) | |
tree | f18d8962103e902003a1ce6899b71f652cdad44d /OpenSim/Region/CoreModules/ServiceConnectorsOut | |
parent | Stopped setting the Service URL "GatekeeperURI" on users' accounts. It isn't ... (diff) | |
download | opensim-SC_OLD-3f76f721372496011efc9328783f9f446b91a92b.zip opensim-SC_OLD-3f76f721372496011efc9328783f9f446b91a92b.tar.gz opensim-SC_OLD-3f76f721372496011efc9328783f9f446b91a92b.tar.bz2 opensim-SC_OLD-3f76f721372496011efc9328783f9f446b91a92b.tar.xz |
Better error-handling when storing assets: recognize that 'null' is an error value
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index ff8b051..38862ca 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs | |||
@@ -346,7 +346,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
346 | return asset.ID; | 346 | return asset.ID; |
347 | } | 347 | } |
348 | 348 | ||
349 | string id = string.Empty; | 349 | string id; |
350 | if (IsHG(asset.ID)) | 350 | if (IsHG(asset.ID)) |
351 | { | 351 | { |
352 | if (m_AssetPerms.AllowedExport(asset.Type)) | 352 | if (m_AssetPerms.AllowedExport(asset.Type)) |
@@ -357,18 +357,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
357 | else | 357 | else |
358 | id = m_GridService.Store(asset); | 358 | id = m_GridService.Store(asset); |
359 | 359 | ||
360 | if (id != String.Empty) | 360 | if (String.IsNullOrEmpty(id)) |
361 | { | 361 | return string.Empty; |
362 | // Placing this here, so that this work with old asset servers that don't send any reply back | 362 | |
363 | // SynchronousRestObjectRequester returns somethins that is not an empty string | 363 | asset.ID = id; |
364 | if (id != null) | ||
365 | asset.ID = id; | ||
366 | 364 | ||
367 | if (m_Cache != null) | 365 | if (m_Cache != null) |
368 | m_Cache.Cache(asset); | 366 | m_Cache.Cache(asset); |
369 | } | ||
370 | return id; | ||
371 | 367 | ||
368 | return id; | ||
372 | } | 369 | } |
373 | 370 | ||
374 | public bool UpdateContent(string id, byte[] data) | 371 | public bool UpdateContent(string id, byte[] data) |