diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs index 16948057c9..6b632d69e5 100644 --- a/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs +++ b/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs @@ -49,9 +49,11 @@ namespace OpenGridServices.Manager System.Net.WebClient mapdownloader = new WebClient(); Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist"); + RegionBlock TempRegionData; XmlDocument doc = new XmlDocument(); doc.Load(regionliststream); + regionliststream.Close(); XmlNode rootnode = doc.FirstChild; if (rootnode.Name != "regions") { @@ -63,6 +65,9 @@ namespace OpenGridServices.Manager if(rootnode.ChildNodes.Item(i).Name != "region") { // TODO - ERROR! } else { + TempRegionData = new RegionBlock(); + + } } } diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs index b4e5cca703..00f7c65ad9 100644 --- a/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs +++ b/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs @@ -1,4 +1,5 @@ using System; +using System.Xml; using libsecondlife; using OpenSim.Framework.Utilities; @@ -8,11 +9,12 @@ namespace OpenGridServices.Manager public class RegionBlock { - - private uint regloc_x; - private uint regloc_y; + public uint regloc_x; + public uint regloc_y; + public string httpd_url; + public string region_name; public ulong regionhandle { get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); } @@ -23,5 +25,13 @@ namespace OpenGridServices.Manager public RegionBlock() { } + + public void LoadFromXmlNode(XmlNode sourcenode) + { + this.regloc_x=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_x").Value); + this.regloc_y=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_y").Value); + this.region_name=sourcenode.Attributes.GetNamedItem("region_name").Value; + this.httpd_url=sourcenode.Attributes.GetNamedItem("httpd_url").Value; + } } }