From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Services/AssetService/AssetService.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Services/AssetService/AssetService.cs') diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 0aefa16..5c37c33 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs @@ -95,7 +95,7 @@ namespace OpenSim.Services.AssetService public virtual AssetBase Get(string id) { // m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); - + UUID assetID; if (!UUID.TryParse(id, out assetID)) @@ -166,7 +166,7 @@ namespace OpenSim.Services.AssetService return new bool[ids.Length]; } } - + public virtual string Store(AssetBase asset) { bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; @@ -174,12 +174,15 @@ namespace OpenSim.Services.AssetService { // m_log.DebugFormat( // "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); - m_Database.StoreAsset(asset); + if (!m_Database.StoreAsset(asset)) + { + return UUID.Zero.ToString(); + } } // else // { // m_log.DebugFormat( -// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); +// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); // } return asset.ID; -- cgit v1.1