From 3a6037b4212818e53743b62e6a8ec5f7ac93e86d Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Thu, 30 Oct 2008 15:26:23 +0000 Subject: From: Alan Webb (alan_webb@us.ibm.com) Cleanups in REST inventory and asset services. --- OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (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 2af26f2..bb76c1f 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs @@ -254,6 +254,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory bool modified = false; bool created = false; + AssetBase asset = null; + Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); if (rdata.Parameters.Length == 1) @@ -269,7 +271,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory } UUID uuid = new UUID(rdata.Parameters[0]); - AssetBase asset = Rest.AssetServices.GetAsset(uuid, false); + asset = Rest.AssetServices.GetAsset(uuid, false); modified = (asset != null); created = !modified; @@ -300,12 +302,14 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory if (created) { + rdata.appendStatus(String.Format("

Created asset {0}, UUID {1}

", asset.Name, asset.FullID)); rdata.Complete(Rest.HttpStatusCodeCreated); } else { if (modified) { + rdata.appendStatus(String.Format("

Modified asset {0}, UUID {1}

", asset.Name, asset.FullID)); rdata.Complete(Rest.HttpStatusCodeOK); } else @@ -365,12 +369,14 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory if (created) { + rdata.appendStatus(String.Format("

Created asset {0}, UUID {1}

", asset.Name, asset.FullID)); rdata.Complete(Rest.HttpStatusCodeCreated); } else { if (modified) { + rdata.appendStatus(String.Format("

Modified asset {0}, UUID {1}

", asset.Name, asset.FullID)); rdata.Complete(Rest.HttpStatusCodeOK); } else -- cgit v1.1