aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
index 77c14c6..cd2074a 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
@@ -190,14 +190,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
190 190
191 private void DoGet(AssetRequestData rdata) 191 private void DoGet(AssetRequestData rdata)
192 { 192 {
193 bool istexture = false;
194
195 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); 193 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
196 194
197 if (rdata.Parameters.Length == 1) 195 if (rdata.Parameters.Length == 1)
198 { 196 {
199 UUID uuid = new UUID(rdata.Parameters[0]); 197 UUID uuid = new UUID(rdata.Parameters[0]);
200 AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture); 198 AssetBase asset = Rest.AssetServices.Get(uuid.ToString());
201 199
202 if (asset != null) 200 if (asset != null)
203 { 201 {
@@ -258,7 +256,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
258 } 256 }
259 257
260 UUID uuid = new UUID(rdata.Parameters[0]); 258 UUID uuid = new UUID(rdata.Parameters[0]);
261 asset = Rest.AssetServices.GetAsset(uuid, false); 259 asset = Rest.AssetServices.Get(uuid.ToString());
262 260
263 modified = (asset != null); 261 modified = (asset != null);
264 created = !modified; 262 created = !modified;
@@ -278,7 +276,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
278 MsgId, rdata.Parameters[0], asset.ID); 276 MsgId, rdata.Parameters[0], asset.ID);
279 } 277 }
280 278
281 Rest.AssetServices.AddAsset(asset); 279 Rest.AssetServices.Store(asset);
282 280
283 } 281 }
284 else 282 else
@@ -338,7 +336,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
338 } 336 }
339 337
340 UUID uuid = new UUID(xml.GetAttribute("id")); 338 UUID uuid = new UUID(xml.GetAttribute("id"));
341 AssetBase asset = Rest.AssetServices.GetAsset(uuid, false); 339 AssetBase asset = Rest.AssetServices.Get(uuid.ToString());
342 340
343 modified = (asset != null); 341 modified = (asset != null);
344 created = !modified; 342 created = !modified;
@@ -352,7 +350,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
352 asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; 350 asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0;
353 asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", "")); 351 asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", ""));
354 352
355 Rest.AssetServices.AddAsset(asset); 353 Rest.AssetServices.Store(asset);
356 354
357 if (created) 355 if (created)
358 { 356 {