From 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d Mon Sep 17 00:00:00 2001 From: diva Date: Fri, 15 May 2009 05:00:25 +0000 Subject: Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only. This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now --- .../ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs') 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 private void DoGet(AssetRequestData rdata) { - bool istexture = false; - Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); if (rdata.Parameters.Length == 1) { UUID uuid = new UUID(rdata.Parameters[0]); - AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture); + AssetBase asset = Rest.AssetServices.Get(uuid.ToString()); if (asset != null) { @@ -258,7 +256,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory } UUID uuid = new UUID(rdata.Parameters[0]); - asset = Rest.AssetServices.GetAsset(uuid, false); + asset = Rest.AssetServices.Get(uuid.ToString()); modified = (asset != null); created = !modified; @@ -278,7 +276,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory MsgId, rdata.Parameters[0], asset.ID); } - Rest.AssetServices.AddAsset(asset); + Rest.AssetServices.Store(asset); } else @@ -338,7 +336,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory } UUID uuid = new UUID(xml.GetAttribute("id")); - AssetBase asset = Rest.AssetServices.GetAsset(uuid, false); + AssetBase asset = Rest.AssetServices.Get(uuid.ToString()); modified = (asset != null); created = !modified; @@ -352,7 +350,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", "")); - Rest.AssetServices.AddAsset(asset); + Rest.AssetServices.Store(asset); if (created) { -- cgit v1.1