aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
diff options
context:
space:
mode:
authorDr Scofield2008-10-30 15:26:23 +0000
committerDr Scofield2008-10-30 15:26:23 +0000
commit3a6037b4212818e53743b62e6a8ec5f7ac93e86d (patch)
tree2dcf2b24f0e692c8f0ddccf328d0eca9ec1e9974 /OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
parentFrom: Alan Webb (alan_webb@us.ibm.com) (diff)
downloadopensim-SC_OLD-3a6037b4212818e53743b62e6a8ec5f7ac93e86d.zip
opensim-SC_OLD-3a6037b4212818e53743b62e6a8ec5f7ac93e86d.tar.gz
opensim-SC_OLD-3a6037b4212818e53743b62e6a8ec5f7ac93e86d.tar.bz2
opensim-SC_OLD-3a6037b4212818e53743b62e6a8ec5f7ac93e86d.tar.xz
From: Alan Webb (alan_webb@us.ibm.com)
Cleanups in REST inventory and asset services.
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs8
1 files changed, 7 insertions, 1 deletions
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
254 bool modified = false; 254 bool modified = false;
255 bool created = false; 255 bool created = false;
256 256
257 AssetBase asset = null;
258
257 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); 259 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
258 260
259 if (rdata.Parameters.Length == 1) 261 if (rdata.Parameters.Length == 1)
@@ -269,7 +271,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
269 } 271 }
270 272
271 UUID uuid = new UUID(rdata.Parameters[0]); 273 UUID uuid = new UUID(rdata.Parameters[0]);
272 AssetBase asset = Rest.AssetServices.GetAsset(uuid, false); 274 asset = Rest.AssetServices.GetAsset(uuid, false);
273 275
274 modified = (asset != null); 276 modified = (asset != null);
275 created = !modified; 277 created = !modified;
@@ -300,12 +302,14 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
300 302
301 if (created) 303 if (created)
302 { 304 {
305 rdata.appendStatus(String.Format("<p> Created asset {0}, UUID {1} <p>", asset.Name, asset.FullID));
303 rdata.Complete(Rest.HttpStatusCodeCreated); 306 rdata.Complete(Rest.HttpStatusCodeCreated);
304 } 307 }
305 else 308 else
306 { 309 {
307 if (modified) 310 if (modified)
308 { 311 {
312 rdata.appendStatus(String.Format("<p> Modified asset {0}, UUID {1} <p>", asset.Name, asset.FullID));
309 rdata.Complete(Rest.HttpStatusCodeOK); 313 rdata.Complete(Rest.HttpStatusCodeOK);
310 } 314 }
311 else 315 else
@@ -365,12 +369,14 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
365 369
366 if (created) 370 if (created)
367 { 371 {
372 rdata.appendStatus(String.Format("<p> Created asset {0}, UUID {1} <p>", asset.Name, asset.FullID));
368 rdata.Complete(Rest.HttpStatusCodeCreated); 373 rdata.Complete(Rest.HttpStatusCodeCreated);
369 } 374 }
370 else 375 else
371 { 376 {
372 if (modified) 377 if (modified)
373 { 378 {
379 rdata.appendStatus(String.Format("<p> Modified asset {0}, UUID {1} <p>", asset.Name, asset.FullID));
374 rdata.Complete(Rest.HttpStatusCodeOK); 380 rdata.Complete(Rest.HttpStatusCodeOK);
375 } 381 }
376 else 382 else