aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AssetService/AssetService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/AssetService/AssetService.cs')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index 08fd3f8..0aefa16 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -153,9 +153,24 @@ namespace OpenSim.Services.AssetService
153 return true; 153 return true;
154 } 154 }
155 155
156 public virtual bool[] AssetsExist(string[] ids)
157 {
158 try
159 {
160 UUID[] uuid = Array.ConvertAll(ids, id => UUID.Parse(id));
161 return m_Database.AssetsExist(uuid);
162 }
163 catch (Exception e)
164 {
165 m_log.Error("[ASSET SERVICE]: Exception getting assets ", e);
166 return new bool[ids.Length];
167 }
168 }
169
156 public virtual string Store(AssetBase asset) 170 public virtual string Store(AssetBase asset)
157 { 171 {
158 if (!m_Database.ExistsAsset(asset.FullID)) 172 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
173 if (!exists)
159 { 174 {
160// m_log.DebugFormat( 175// m_log.DebugFormat(
161// "[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);
@@ -186,4 +201,4 @@ namespace OpenSim.Services.AssetService
186 return m_Database.Delete(id); 201 return m_Database.Delete(id);
187 } 202 }
188 } 203 }
189} \ No newline at end of file 204}