diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Services/AssetService/AssetService.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/AssetService/AssetService.cs | 11 |
1 files changed, 7 insertions, 4 deletions
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 | |||
95 | public virtual AssetBase Get(string id) | 95 | public virtual AssetBase Get(string id) |
96 | { | 96 | { |
97 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); | 97 | // m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); |
98 | 98 | ||
99 | UUID assetID; | 99 | UUID assetID; |
100 | 100 | ||
101 | if (!UUID.TryParse(id, out assetID)) | 101 | if (!UUID.TryParse(id, out assetID)) |
@@ -166,7 +166,7 @@ namespace OpenSim.Services.AssetService | |||
166 | return new bool[ids.Length]; | 166 | return new bool[ids.Length]; |
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | public virtual string Store(AssetBase asset) | 170 | public virtual string Store(AssetBase asset) |
171 | { | 171 | { |
172 | bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; | 172 | bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; |
@@ -174,12 +174,15 @@ namespace OpenSim.Services.AssetService | |||
174 | { | 174 | { |
175 | // m_log.DebugFormat( | 175 | // m_log.DebugFormat( |
176 | // "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); | 176 | // "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); |
177 | m_Database.StoreAsset(asset); | 177 | if (!m_Database.StoreAsset(asset)) |
178 | { | ||
179 | return UUID.Zero.ToString(); | ||
180 | } | ||
178 | } | 181 | } |
179 | // else | 182 | // else |
180 | // { | 183 | // { |
181 | // m_log.DebugFormat( | 184 | // m_log.DebugFormat( |
182 | // "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); | 185 | // "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); |
183 | // } | 186 | // } |
184 | 187 | ||
185 | return asset.ID; | 188 | return asset.ID; |