diff options
author | Justin Clarke Casey | 2008-12-19 19:35:14 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-19 19:35:14 +0000 |
commit | e62016d2c77270a0dc23e31c5d1ccc2d412fcec3 (patch) | |
tree | fb80c1e661e65878e3fa9962aad1aab49e70f939 /OpenSim/ApplicationPlugins/Rest/Regions | |
parent | * refactor: remove xml serialization wrappers from Scene (diff) | |
download | opensim-SC-e62016d2c77270a0dc23e31c5d1ccc2d412fcec3.zip opensim-SC-e62016d2c77270a0dc23e31c5d1ccc2d412fcec3.tar.gz opensim-SC-e62016d2c77270a0dc23e31c5d1ccc2d412fcec3.tar.bz2 opensim-SC-e62016d2c77270a0dc23e31c5d1ccc2d412fcec3.tar.xz |
minor: Remove some serialization module scene wrappers
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Regions')
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | 7 | ||||
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index d812e24..35b4d8a 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | |||
@@ -44,6 +44,7 @@ using OpenSim.Framework; | |||
44 | using OpenSim.Framework.Console; | 44 | using OpenSim.Framework.Console; |
45 | using OpenSim.Framework.Servers; | 45 | using OpenSim.Framework.Servers; |
46 | using OpenSim.Framework.Communications; | 46 | using OpenSim.Framework.Communications; |
47 | using OpenSim.Region.Environment.Interfaces; | ||
47 | using OpenSim.Region.Environment.Scenes; | 48 | using OpenSim.Region.Environment.Scenes; |
48 | using OpenSim.ApplicationPlugins.Rest; | 49 | using OpenSim.ApplicationPlugins.Rest; |
49 | 50 | ||
@@ -219,7 +220,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
219 | { | 220 | { |
220 | httpResponse.SendChunked = true; | 221 | httpResponse.SendChunked = true; |
221 | httpResponse.ContentType = "text/xml"; | 222 | httpResponse.ContentType = "text/xml"; |
222 | scene.SavePrimsToXml2(new StreamWriter(httpResponse.OutputStream), min, max); | 223 | |
224 | IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); | ||
225 | if (serialiser != null) | ||
226 | serialiser.SavePrimsToXml2(scene, new StreamWriter(httpResponse.OutputStream), min, max); | ||
227 | |||
223 | return ""; | 228 | return ""; |
224 | } | 229 | } |
225 | } | 230 | } |
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs index 73a1b9b..932f512 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs | |||
@@ -44,6 +44,7 @@ using OpenSim.Framework; | |||
44 | using OpenSim.Framework.Console; | 44 | using OpenSim.Framework.Console; |
45 | using OpenSim.Framework.Servers; | 45 | using OpenSim.Framework.Servers; |
46 | using OpenSim.Framework.Communications; | 46 | using OpenSim.Framework.Communications; |
47 | using OpenSim.Region.Environment.Interfaces; | ||
47 | using OpenSim.Region.Environment.Scenes; | 48 | using OpenSim.Region.Environment.Scenes; |
48 | using OpenSim.ApplicationPlugins.Rest; | 49 | using OpenSim.ApplicationPlugins.Rest; |
49 | 50 | ||
@@ -120,7 +121,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
120 | 121 | ||
121 | public string LoadPrims(string requestBody, OSHttpRequest request, OSHttpResponse response, Scene scene) | 122 | public string LoadPrims(string requestBody, OSHttpRequest request, OSHttpResponse response, Scene scene) |
122 | { | 123 | { |
123 | scene.LoadPrimsFromXml2(new StringReader(requestBody), true); | 124 | IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); |
125 | if (serialiser != null) | ||
126 | serialiser.LoadPrimsFromXml2(scene, new StringReader(requestBody), true); | ||
127 | |||
124 | return ""; | 128 | return ""; |
125 | } | 129 | } |
126 | 130 | ||