From 31e5d348f6446571abe9d6d5ca5f5e350b6c6ab0 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 14 Jul 2008 14:40:39 +0000 Subject: [PATCH] adding support for Xml2 serialization format to XmlRpcLoadXMLMethod. --- .../RemoteController/RemoteAdminPlugin.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 0a58a0ab54..d61e5668cf 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -712,7 +712,26 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["switched"] = "true"; - m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0)); + string xml_version = "1"; + if (requestData.Contains("xml_version")) + { + xml_version = (string)requestData["xml_version"]; + } + + switch (xml_version) + { + case "1": + m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0)); + break; + + case "2": + m_app.SceneManager.LoadCurrentSceneFromXml2(filename); + break; + + default: + throw new Exception(String.Format("unknown Xml{0} format", xml_version)); + } + responseData["loaded"] = "true"; response.Value = responseData;