From 1d1e444aed5f9eb3a77092f01f1f4d4ed3e18d11 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 26 Apr 2014 02:43:13 +0200 Subject: Convert region loading to new format --- OpenSim/Framework/RegionInfo.cs | 10 ++++++---- OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 6dde62f..24ec181 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -224,10 +224,12 @@ namespace OpenSim.Framework // public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource) { - // m_configSource = configSource; - configMember = - new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); - configMember.performConfigurationRetrieve(); + XmlElement elem = (XmlElement)xmlNode; + string name = elem.GetAttribute("Name"); + string xmlstr = "" + xmlNode.OuterXml + ""; + XmlConfigSource source = new XmlConfigSource(XmlReader.Create(new StringReader(xmlstr))); + ReadNiniConfig(source, name); + m_serverURI = string.Empty; } diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index c7caf6f..65de563 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs @@ -93,8 +93,8 @@ namespace OpenSim.Framework.RegionLoader.Web xmlSource.Length); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlSource); - if (xmlDoc.FirstChild.Name == "Regions") - { + if (xmlDoc.FirstChild.Name == "Nini") + { regionCount = xmlDoc.FirstChild.ChildNodes.Count; if (regionCount > 0) -- cgit v1.1