From 239dcaffb79426dd08177e79d04e026fad651ada Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 26 Sep 2015 14:14:05 +0100 Subject: [PATCH] coment out some debug, clean a bit --- .../Grid/LocalGridServiceConnector.cs | 15 +++------------ .../ServiceConnectorsOut/Grid/RegionCache.cs | 12 ------------ OpenSim/Services/GridService/GridService.cs | 8 -------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 6752e31cfa..e585c2508e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -201,15 +201,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid uint regionX = Util.WorldToRegionLoc((uint)x); uint regionY = Util.WorldToRegionLoc((uint)y); - /* we are insane now - // Sanity check - if ((Util.RegionToWorldLoc(regionX) != (uint)x) || (Util.RegionToWorldLoc(regionY) != (uint)y)) - { - m_log.WarnFormat("{0} GetRegionByPosition. Bad position requested: not the base of the region. Requested Pos=<{1},{2}>, Should Be=<{3},{4}>", - LogHeader, x, y, Util.RegionToWorldLoc(regionX), Util.RegionToWorldLoc(regionY)); - } - */ - // First see if it's a neighbour, even if it isn't on this sim. // Neighbour data is cached in memory, so this is fast @@ -220,9 +211,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid region = rcache.GetRegionByPosition(x, y); if (region != null) { - m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>", - LogHeader, region.RegionName, rcache.RegionName, - Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); + //m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>", + // LogHeader, region.RegionName, rcache.RegionName, + // Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); break; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs index 7ae4771905..2961c10509 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs @@ -81,21 +81,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid { return new List(m_neighbours.Values); } - public GridRegion GetRegionByPosition(int x, int y) { - /* - uint xsnap = (uint)(x / Constants.RegionSize) * Constants.RegionSize; - uint ysnap = (uint)(y / Constants.RegionSize) * Constants.RegionSize; - ulong handle = Util.RegionWorldLocToHandle(xsnap, ysnap); - - if (m_neighbours.ContainsKey(handle)) - return m_neighbours[handle]; - - return null; - */ - // do actual search by position // not the best, but this will not hold that many regions GridRegion foundRegion = null; diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 80592753c1..53805d062d 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -487,14 +487,6 @@ namespace OpenSim.Services.GridService if (region != null) { - // Not really? Maybe? - -/* this fails wiht var regions. My_sql db should now handle var regions - List rdatas = m_Database.Get( - region.posX - region.sizeX - 1, region.posY - region.sizeY - 1, - region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID); -*/ - // so send normal search area List rdatas = m_Database.Get( region.posX - 1, region.posY - 1, region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);