From 1c70790a8f7afba93e977bcad926198b9bba58b3 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 10 Mar 2009 20:42:44 +0000 Subject: * Cleanup and CCC (Code Convention Conformance) --- .../ApplicationPlugins/Rest/Regions/POSTHandler.cs | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest/Regions') diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs index aa93f28..c689daa 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs @@ -34,10 +34,10 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.ApplicationPlugins.Rest.Regions { - public partial class RestRegionPlugin : RestPlugin { #region POST methods + public string PostHandler(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { @@ -59,24 +59,26 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions if (String.IsNullOrEmpty(param)) return CreateRegion(httpRequest, httpResponse); // Parse region ID and other parameters - param = param.TrimEnd(new char[]{'/'}); + param = param.TrimEnd(new char[] {'/'}); string[] comps = param.Split('/'); - UUID regionID = (UUID)comps[0]; + UUID regionID = (UUID) comps[0]; m_log.DebugFormat("{0} POST region UUID {1}", MsgID, regionID.ToString()); if (UUID.Zero == regionID) throw new Exception("missing region ID"); Scene scene = null; App.SceneManager.TryGetScene(regionID, out scene); - if (null == scene) return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound, - "POST", "cannot find region {0}", regionID.ToString()); + if (null == scene) + return Failure(httpResponse, OSHttpStatusCode.ClientErrorNotFound, + "POST", "cannot find region {0}", regionID.ToString()); - if (2 == comps.Length) { + if (2 == comps.Length) + { // check for {prims} switch (comps[1].ToLower()) { - case "prims": - return LoadPrims(request, httpRequest, httpResponse, scene); + case "prims": + return LoadPrims(request, httpRequest, httpResponse, scene); } } @@ -106,12 +108,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions public string LoadPrims(string requestBody, OSHttpRequest request, OSHttpResponse response, Scene scene) { IRegionSerialiserModule serialiser = scene.RequestModuleInterface(); - if (serialiser != null) + if (serialiser != null) serialiser.LoadPrimsFromXml2(scene, new StringReader(requestBody), true); - + return ""; } #endregion POST methods } -} +} \ No newline at end of file -- cgit v1.1