diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index e976c40685..218fcd04b5 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs @@ -101,10 +101,7 @@ namespace OpenSim.Data.Null ret.Add(r); } - if (ret.Count > 0) - return ret; - - return null; + return ret; } public bool Store(RegionData data) diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index eaeed6f584..f50e6a2bb6 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -164,12 +164,17 @@ namespace OpenSim.Server.Handlers.Grid //m_log.DebugFormat("[GRID HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count); Dictionary result = new Dictionary(); - int i = 0; - foreach (GridRegion rinfo in rinfos) + if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0))) + result["result"] = "null"; + else { - Dictionary rinfoDict = rinfo.ToKeyValuePairs(); - result["region" + i] = rinfoDict; - i++; + int i = 0; + foreach (GridRegion rinfo in rinfos) + { + Dictionary rinfoDict = rinfo.ToKeyValuePairs(); + result["region" + i] = rinfoDict; + i++; + } } string xmlString = ServerUtils.BuildXmlResponse(result); @@ -181,32 +186,184 @@ namespace OpenSim.Server.Handlers.Grid byte[] GetRegionByUUID(Dictionary request) { - // TODO - return new byte[0]; + UUID scopeID = UUID.Zero; + if (request["SCOPEID"] != null) + UUID.TryParse(request["SCOPEID"], out scopeID); + else + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get neighbours"); + + UUID regionID = UUID.Zero; + if (request["REGIONID"] != null) + UUID.TryParse(request["REGIONID"], out regionID); + else + m_log.WarnFormat("[GRID HANDLER]: no regionID in request to get neighbours"); + + GridRegion rinfo = m_GridService.GetRegionByUUID(scopeID, regionID); + //m_log.DebugFormat("[GRID HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count); + + Dictionary result = new Dictionary(); + if (rinfo == null) + result["result"] = "null"; + else + result["result"] = rinfo.ToKeyValuePairs(); + + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); } byte[] GetRegionByPosition(Dictionary request) { - // TODO - return new byte[0]; + UUID scopeID = UUID.Zero; + if (request["SCOPEID"] != null) + UUID.TryParse(request["SCOPEID"], out scopeID); + else + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region by position"); + + int x = 0, y = 0; + if (request["X"] != null) + Int32.TryParse(request["X"], out x); + else + m_log.WarnFormat("[GRID HANDLER]: no X in request to get region by position"); + if (request["Y"] != null) + Int32.TryParse(request["Y"], out y); + else + m_log.WarnFormat("[GRID HANDLER]: no Y in request to get region by position"); + + GridRegion rinfo = m_GridService.GetRegionByPosition(scopeID, x, y); + //m_log.DebugFormat("[GRID HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count); + + Dictionary result = new Dictionary(); + if (rinfo == null) + result["result"] = "null"; + else + result["result"] = rinfo.ToKeyValuePairs(); + + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); } byte[] GetRegionByName(Dictionary request) { - // TODO - return new byte[0]; + UUID scopeID = UUID.Zero; + if (request["SCOPEID"] != null) + UUID.TryParse(request["SCOPEID"], out scopeID); + else + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region by name"); + + string regionName = string.Empty; + if (request["NAME"] != null) + regionName = request["NAME"]; + else + m_log.WarnFormat("[GRID HANDLER]: no name in request to get region by name"); + + GridRegion rinfo = m_GridService.GetRegionByName(scopeID, regionName); + //m_log.DebugFormat("[GRID HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count); + + Dictionary result = new Dictionary(); + if (rinfo == null) + result["result"] = "null"; + else + result["result"] = rinfo.ToKeyValuePairs(); + + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); } byte[] GetRegionsByName(Dictionary request) { - // TODO - return new byte[0]; + UUID scopeID = UUID.Zero; + if (request["SCOPEID"] != null) + UUID.TryParse(request["SCOPEID"], out scopeID); + else + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get regions by name"); + + string regionName = string.Empty; + if (request["NAME"] != null) + regionName = request["NAME"]; + else + m_log.WarnFormat("[GRID HANDLER]: no NAME in request to get regions by name"); + + int max = 0; + if (request["MAX"] != null) + Int32.TryParse(request["MAX"], out max); + else + m_log.WarnFormat("[GRID HANDLER]: no MAX in request to get regions by name"); + + List rinfos = m_GridService.GetRegionsByName(scopeID, regionName, max); + //m_log.DebugFormat("[GRID HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count); + + Dictionary result = new Dictionary(); + if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0))) + result["result"] = "null"; + else + { + int i = 0; + foreach (GridRegion rinfo in rinfos) + { + Dictionary rinfoDict = rinfo.ToKeyValuePairs(); + result["region" + i] = rinfoDict; + i++; + } + } + + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); } byte[] GetRegionRange(Dictionary request) { - // TODO - return new byte[0]; + UUID scopeID = UUID.Zero; + if (request["SCOPEID"] != null) + UUID.TryParse(request["SCOPEID"], out scopeID); + else + m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region range"); + + int xmin = 0, xmax = 0, ymin = 0, ymax = 0; + if (request["XMIN"] != null) + Int32.TryParse(request["XMIN"], out xmin); + else + m_log.WarnFormat("[GRID HANDLER]: no XMIN in request to get region range"); + if (request["XMAX"] != null) + Int32.TryParse(request["XMAX"], out xmax); + else + m_log.WarnFormat("[GRID HANDLER]: no XMAX in request to get region range"); + if (request["YMIN"] != null) + Int32.TryParse(request["YMIN"], out ymin); + else + m_log.WarnFormat("[GRID HANDLER]: no YMIN in request to get region range"); + if (request["YMAX"] != null) + Int32.TryParse(request["YMAX"], out ymax); + else + m_log.WarnFormat("[GRID HANDLER]: no YMAX in request to get region range"); + + + List rinfos = m_GridService.GetRegionRange(scopeID, xmin, xmax, ymin, ymax); + + Dictionary result = new Dictionary(); + if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0))) + result["result"] = "null"; + else + { + int i = 0; + foreach (GridRegion rinfo in rinfos) + { + Dictionary rinfoDict = rinfo.ToKeyValuePairs(); + result["region" + i] = rinfoDict; + i++; + } + } + string xmlString = ServerUtils.BuildXmlResponse(result); + //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); + UTF8Encoding encoding = new UTF8Encoding(); + return encoding.GetBytes(xmlString); } #endregion diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index fa197c89c7..ebb66a7746 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -98,15 +98,19 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "register"; string reqString = ServerUtils.BuildQueryString(sendData); - m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); + //m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI + "/grid", reqString); + if (reply != string.Empty) + { + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - - if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) - return true; + if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) + return true; + } + else + m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply"); return false; } @@ -123,10 +127,15 @@ namespace OpenSim.Services.Connectors m_ServerURI + "/grid", ServerUtils.BuildQueryString(sendData)); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + if (reply != string.Empty) + { + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) - return true; + if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) + return true; + } + else + m_log.DebugFormat("[GRID CONNECTOR]: DeregisterRegion received null reply"); return false; } @@ -151,7 +160,7 @@ namespace OpenSim.Services.Connectors if (replyData != null) { Dictionary.ValueCollection rinfosList = replyData.Values; - m_log.DebugFormat("[GRID CONNECTOR]: get neighbours returned {0} elements", rinfosList.Count); + //m_log.DebugFormat("[GRID CONNECTOR]: get neighbours returned {0} elements", rinfosList.Count); foreach (object r in rinfosList) { if (r is Dictionary) @@ -184,20 +193,26 @@ namespace OpenSim.Services.Connectors m_ServerURI + "/grid", ServerUtils.BuildQueryString(sendData)); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - GridRegion rinfo = null; - if ((replyData != null) && (replyData["result"] != null)) + + if (reply != string.Empty) { - if (replyData["result"] is Dictionary) - rinfo = new GridRegion((Dictionary)replyData["result"]); + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if ((replyData != null) && (replyData["result"] != null)) + { + if (replyData["result"] is Dictionary) + rinfo = new GridRegion((Dictionary)replyData["result"]); + //else + // m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID {0}, {1} received null response", + // scopeID, regionID); + } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID {0}, {1} received invalid response", + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID {0}, {1} received null response", scopeID, regionID); } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID {0}, {1} received null response", - scopeID, regionID); + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID received null reply"); return rinfo; } @@ -216,20 +231,25 @@ namespace OpenSim.Services.Connectors m_ServerURI + "/grid", ServerUtils.BuildQueryString(sendData)); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - GridRegion rinfo = null; - if ((replyData != null) && (replyData["result"] != null)) + if (reply != string.Empty) { - if (replyData["result"] is Dictionary) - rinfo = new GridRegion((Dictionary)replyData["result"]); + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if ((replyData != null) && (replyData["result"] != null)) + { + if (replyData["result"] is Dictionary) + rinfo = new GridRegion((Dictionary)replyData["result"]); + else + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received invalid response", + scopeID, x, y); + } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received invalid response", + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received null response", scopeID, x, y); } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received null response", - scopeID, x, y); + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); return rinfo; } @@ -247,20 +267,22 @@ namespace OpenSim.Services.Connectors m_ServerURI + "/grid", ServerUtils.BuildQueryString(sendData)); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - GridRegion rinfo = null; - if ((replyData != null) && (replyData["result"] != null)) + if (reply != string.Empty) { - if (replyData["result"] is Dictionary) - rinfo = new GridRegion((Dictionary)replyData["result"]); + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if ((replyData != null) && (replyData["result"] != null)) + { + if (replyData["result"] is Dictionary) + rinfo = new GridRegion((Dictionary)replyData["result"]); + } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1} received invalid response", + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1} received null response", scopeID, regionName); } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1} received null response", - scopeID, regionName); + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByName received null reply"); return rinfo; } @@ -279,27 +301,33 @@ namespace OpenSim.Services.Connectors m_ServerURI + "/grid", ServerUtils.BuildQueryString(sendData)); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - List rinfos = new List(); - if (replyData != null) + + if (reply != string.Empty) { - Dictionary.ValueCollection rinfosList = replyData.Values; - foreach (object r in rinfosList) + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData != null) { - if (r is Dictionary) + Dictionary.ValueCollection rinfosList = replyData.Values; + foreach (object r in rinfosList) { - GridRegion rinfo = new GridRegion((Dictionary)r); - rinfos.Add(rinfo); + if (r is Dictionary) + { + GridRegion rinfo = new GridRegion((Dictionary)r); + rinfos.Add(rinfo); + } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionsByName {0}, {1}, {2} received invalid response", + scopeID, name, maxNumber); } - else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionsByName {0}, {1}, {2} received invalid response", - scopeID, name, maxNumber); } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionsByName {0}, {1}, {2} received null response", + scopeID, name, maxNumber); } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionsByName {0}, {1}, {2} received null response", - scopeID, name, maxNumber); + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionsByName received null reply"); return rinfos; } @@ -316,31 +344,36 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "get_region_range"; + List rinfos = new List(); + string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI + "/grid", ServerUtils.BuildQueryString(sendData)); - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); - List rinfos = new List(); - if (replyData != null) + if (reply != string.Empty) { - Dictionary.ValueCollection rinfosList = replyData.Values; - foreach (object r in rinfosList) + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData != null) { - if (r is Dictionary) + Dictionary.ValueCollection rinfosList = replyData.Values; + foreach (object r in rinfosList) { - GridRegion rinfo = new GridRegion((Dictionary)r); - rinfos.Add(rinfo); + if (r is Dictionary) + { + GridRegion rinfo = new GridRegion((Dictionary)r); + rinfos.Add(rinfo); + } } - else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionRange {0}, {1}-{2} {3}-{4} received invalid response", - scopeID, xmin, xmax, ymin, ymax); } + else + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionRange {0}, {1}-{2} {3}-{4} received null response", + scopeID, xmin, xmax, ymin, ymax); } else - m_log.DebugFormat("[GRID CONNECTOR]: GetRegionRange {0}, {1}-{2} {3}-{4} received null response", - scopeID, xmin, xmax, ymin, ymax); + m_log.DebugFormat("[GRID CONNECTOR]: GetRegionRange received null reply"); return rinfos; } diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index d12276f789..4bdcde2eb6 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -263,6 +263,7 @@ namespace OpenSim.Services.Interfaces kvp["uuid"] = RegionID.ToString(); kvp["locX"] = RegionLocX.ToString(); kvp["locY"] = RegionLocY.ToString(); + kvp["name"] = RegionName; kvp["external_ip_address"] = ExternalEndPoint.Address.ToString(); kvp["external_port"] = ExternalEndPoint.Port.ToString(); kvp["external_host_name"] = ExternalHostName; @@ -286,6 +287,9 @@ namespace OpenSim.Services.Interfaces if (kvp["locY"] != null) RegionLocY = Convert.ToInt32((string)kvp["locY"]); + if (kvp["name"] != null) + RegionName = (string)kvp["name"]; + if ((kvp["external_ip_address"] != null) && (kvp["external_port"] != null)) { int port = 0; diff --git a/OpenSim/Tests/Clients/Grid/GridClient.cs b/OpenSim/Tests/Clients/Grid/GridClient.cs index 0b84f9ba8e..155f38e7f8 100644 --- a/OpenSim/Tests/Clients/Grid/GridClient.cs +++ b/OpenSim/Tests/Clients/Grid/GridClient.cs @@ -35,21 +35,21 @@ namespace OpenSim.Tests.Clients.GridClient GridRegion r2 = CreateRegion("Test Region 2", 1001, 1000); GridRegion r3 = CreateRegion("Test Region 3", 1005, 1000); - Console.WriteLine("[GRID CLIENT]: Registering region 1"); + Console.WriteLine("[GRID CLIENT]: *** Registering region 1"); bool success = m_Connector.RegisterRegion(UUID.Zero, r1); if (success) Console.WriteLine("[GRID CLIENT]: Successfully registered region 1"); else Console.WriteLine("[GRID CLIENT]: region 1 failed to register"); - Console.WriteLine("[GRID CLIENT]: Registering region 2"); + Console.WriteLine("[GRID CLIENT]: *** Registering region 2"); success = m_Connector.RegisterRegion(UUID.Zero, r2); if (success) Console.WriteLine("[GRID CLIENT]: Successfully registered region 2"); else Console.WriteLine("[GRID CLIENT]: region 2 failed to register"); - Console.WriteLine("[GRID CLIENT]: Registering region 3"); + Console.WriteLine("[GRID CLIENT]: *** Registering region 3"); success = m_Connector.RegisterRegion(UUID.Zero, r3); if (success) Console.WriteLine("[GRID CLIENT]: Successfully registered region 3"); @@ -57,20 +57,20 @@ namespace OpenSim.Tests.Clients.GridClient Console.WriteLine("[GRID CLIENT]: region 3 failed to register"); - Console.WriteLine("[GRID CLIENT]: Deregistering region 3"); + Console.WriteLine("[GRID CLIENT]: *** Deregistering region 3"); success = m_Connector.DeregisterRegion(r3.RegionID); if (success) Console.WriteLine("[GRID CLIENT]: Successfully deregistered region 3"); else Console.WriteLine("[GRID CLIENT]: region 3 failed to deregister"); - Console.WriteLine("[GRID CLIENT]: Registering region 3 again"); + Console.WriteLine("[GRID CLIENT]: *** Registering region 3 again"); success = m_Connector.RegisterRegion(UUID.Zero, r3); if (success) Console.WriteLine("[GRID CLIENT]: Successfully registered region 3"); else Console.WriteLine("[GRID CLIENT]: region 3 failed to register"); - Console.WriteLine("[GRID CLIENT]: GetNeighbours of region 1"); + Console.WriteLine("[GRID CLIENT]: *** GetNeighbours of region 1"); List regions = m_Connector.GetNeighbours(UUID.Zero, r1.RegionID); if (regions == null) Console.WriteLine("[GRID CLIENT]: GetNeighbours of region 1 failed"); @@ -85,6 +85,58 @@ namespace OpenSim.Tests.Clients.GridClient Console.WriteLine("[GRID CLIENT]: GetNeighbours of region 1 returned 0 neighbours"); + Console.WriteLine("[GRID CLIENT]: *** GetRegionByUUID of region 2 (this should succeed)"); + GridRegion region = m_Connector.GetRegionByUUID(UUID.Zero, r2.RegionID); + if (region == null) + Console.WriteLine("[GRID CLIENT]: GetRegionByUUID returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionByUUID returned region " + region.RegionName); + + Console.WriteLine("[GRID CLIENT]: *** GetRegionByUUID of non-existent region (this should fail)"); + region = m_Connector.GetRegionByUUID(UUID.Zero, UUID.Random()); + if (region == null) + Console.WriteLine("[GRID CLIENT]: GetRegionByUUID returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionByUUID returned region " + region.RegionName); + + Console.WriteLine("[GRID CLIENT]: *** GetRegionByName of region 3 (this should succeed)"); + region = m_Connector.GetRegionByName(UUID.Zero, r3.RegionName); + if (region == null) + Console.WriteLine("[GRID CLIENT]: GetRegionByName returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionByName returned region " + region.RegionName); + + Console.WriteLine("[GRID CLIENT]: *** GetRegionByName of non-existent region (this should fail)"); + region = m_Connector.GetRegionByName(UUID.Zero, "Foo"); + if (region == null) + Console.WriteLine("[GRID CLIENT]: GetRegionByName returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionByName returned region " + region.RegionName); + + Console.WriteLine("[GRID CLIENT]: *** GetRegionsByName (this should return 3 regions)"); + regions = m_Connector.GetRegionsByName(UUID.Zero, "Test", 10); + if (regions == null) + Console.WriteLine("[GRID CLIENT]: GetRegionsByName returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionsByName returned " + regions.Count + " regions"); + + Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)"); + regions = m_Connector.GetRegionRange(UUID.Zero, + 900 * (int)Constants.RegionSize, 1002 * (int) Constants.RegionSize, + 900 * (int)Constants.RegionSize, 1002 * (int) Constants.RegionSize); + if (regions == null) + Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionRange returned " + regions.Count + " regions"); + Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 0 regions)"); + regions = m_Connector.GetRegionRange(UUID.Zero, + 900 * (int)Constants.RegionSize, 950 * (int)Constants.RegionSize, + 900 * (int)Constants.RegionSize, 950 * (int)Constants.RegionSize); + if (regions == null) + Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null"); + else + Console.WriteLine("[GRID CLIENT]: GetRegionRange returned " + regions.Count + " regions"); + } private static GridRegion CreateRegion(string name, uint xcell, uint ycell)