From 01ae916bad672722aa62ee712b7b580d6f5f4370 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Nov 2011 00:07:34 +0000
Subject: Don't register a region twice on both official registration and
maptile regeneration.
Maptile storage appears orthogonal to region registration
---
OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs | 4 +++-
OpenSim/Services/GridService/GridService.cs | 1 +
OpenSim/Services/MapImageService/MapImageService.cs | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
index 69e2d17..e46714e 100644
--- a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
+++ b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
@@ -129,7 +129,9 @@ namespace OpenSim.Services.Connectors
}
else
- m_log.DebugFormat("[MAP IMAGE CONNECTOR]: RegisterRegion received null reply");
+ {
+ m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Map post received null reply");
+ }
}
catch (Exception e)
{
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 05cfe5f..768e4e1 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -156,6 +156,7 @@ namespace OpenSim.Services.GridService
regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID);
return "Region overlaps another region";
}
+
if ((region != null) && (region.RegionID == regionInfos.RegionID) &&
((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
{
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs
index 7e7391c..83727b6 100644
--- a/OpenSim/Services/MapImageService/MapImageService.cs
+++ b/OpenSim/Services/MapImageService/MapImageService.cs
@@ -138,6 +138,8 @@ namespace OpenSim.Services.MapImageService
public byte[] GetMapTile(string fileName, out string format)
{
+// m_log.DebugFormat("[MAP IMAGE SERVICE]: Getting map tile {0}", fileName);
+
format = ".jpg";
string fullName = Path.Combine(m_TilesStoragePath, fileName);
if (File.Exists(fullName))
--
cgit v1.1
From 7a180781778a6369799c244ab95f5e6844b3be05 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Nov 2011 00:10:29 +0000
Subject: improve region deregistration log message
---
OpenSim/Services/GridService/GridService.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 768e4e1..82a9193 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -244,11 +244,14 @@ namespace OpenSim.Services.GridService
public bool DeregisterRegion(UUID regionID)
{
- m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID);
RegionData region = m_Database.Get(regionID, UUID.Zero);
if (region == null)
return false;
+ m_log.DebugFormat(
+ "[GRID SERVICE]: Degistering region {0} ({1}) at {2}-{3}",
+ region.RegionName, region.RegionID, region.posX, region.posY);
+
int flags = Convert.ToInt32(region.Data["flags"]);
if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Data.RegionFlags.Persistent) != 0)
--
cgit v1.1
From d05d065d859c8877cb910cf5748e32e1560086a6 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Nov 2011 00:29:52 +0000
Subject: Improve some grid region log messages to express regions at
co-ordinate (e.g. 1000, 1000) rather than meter positions (256000, 256000)
---
OpenSim/Services/GridService/GridService.cs | 6 +++---
OpenSim/Services/Interfaces/IGridService.cs | 21 +++++++++++++++++----
OpenSim/Services/MapImageService/MapImageService.cs | 2 +-
3 files changed, 21 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 82a9193..eae10e8 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -237,7 +237,7 @@ namespace OpenSim.Services.GridService
}
m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) registered successfully at {2}-{3}",
- regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
+ regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionCoordX, regionInfos.RegionCoordY);
return String.Empty;
}
@@ -250,8 +250,8 @@ namespace OpenSim.Services.GridService
m_log.DebugFormat(
"[GRID SERVICE]: Degistering region {0} ({1}) at {2}-{3}",
- region.RegionName, region.RegionID, region.posX, region.posY);
-
+ region.RegionName, region.RegionID, region.coordX, region.coordY);
+
int flags = Convert.ToInt32(region.Data["flags"]);
if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Data.RegionFlags.Persistent) != 0)
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 41dd20c..7137f9a 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -103,9 +103,8 @@ namespace OpenSim.Services.Interfaces
int GetRegionFlags(UUID scopeID, UUID regionID);
}
- public class GridRegion : Object
+ public class GridRegion
{
-
///
/// The port by which http communication occurs with the region
///
@@ -149,6 +148,19 @@ namespace OpenSim.Services.Interfaces
protected IPEndPoint m_internalEndPoint;
+ ///
+ /// The co-ordinate of this region.
+ ///
+ public int RegionCoordX { get { return RegionLocX / (int)Constants.RegionSize; } }
+
+ ///
+ /// The co-ordinate of this region
+ ///
+ public int RegionCoordY { get { return RegionLocY / (int)Constants.RegionSize; } }
+
+ ///
+ /// The location of this region in meters.
+ ///
public int RegionLocX
{
get { return m_regionLocX; }
@@ -156,6 +168,9 @@ namespace OpenSim.Services.Interfaces
}
protected int m_regionLocX;
+ ///
+ /// The location of this region in meters.
+ ///
public int RegionLocY
{
get { return m_regionLocY; }
@@ -407,8 +422,6 @@ namespace OpenSim.Services.Interfaces
if (kvp.ContainsKey("Token"))
Token = kvp["Token"].ToString();
-
}
}
-
}
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs
index 83727b6..a85ee70 100644
--- a/OpenSim/Services/MapImageService/MapImageService.cs
+++ b/OpenSim/Services/MapImageService/MapImageService.cs
@@ -208,7 +208,7 @@ namespace OpenSim.Services.MapImageService
private bool CreateTile(uint zoomLevel, int x, int y)
{
- m_log.DebugFormat("[MAP IMAGE SERVICE]: Create tile for {0} {1}, zoom {2}", x, y, zoomLevel);
+// m_log.DebugFormat("[MAP IMAGE SERVICE]: Create tile for {0} {1}, zoom {2}", x, y, zoomLevel);
int prevWidth = (int)Math.Pow(2, (double)zoomLevel - 2);
int thisWidth = (int)Math.Pow(2, (double)zoomLevel - 1);
--
cgit v1.1
From 10a23a823edb261af2c0b7895ce0898ea6918ef1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 19 Nov 2011 01:16:07 +0000
Subject: Get rid of the spurious [WEB UTIL] couldn't decode : Invalid character 'O' in input string
messages
These are just the result of an attempt to canonicalize received messages - it's not important that we constantly log them.
Also finally get the deregister grid service message working properly
---
OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 2 +-
OpenSim/Services/GridService/GridService.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 7cbd361..c45f456 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -369,7 +369,7 @@ namespace OpenSim.Services.Connectors.Simulation
///
public bool CloseAgent(GridRegion destination, UUID id)
{
- // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start");
+// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start");
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index eae10e8..89f0716 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -249,7 +249,7 @@ namespace OpenSim.Services.GridService
return false;
m_log.DebugFormat(
- "[GRID SERVICE]: Degistering region {0} ({1}) at {2}-{3}",
+ "[GRID SERVICE]: Deregistering region {0} ({1}) at {2}-{3}",
region.RegionName, region.RegionID, region.coordX, region.coordY);
int flags = Convert.ToInt32(region.Data["flags"]);
@@ -296,7 +296,7 @@ namespace OpenSim.Services.GridService
}
}
- m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighbours", region.RegionName, rinfos.Count);
+// m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighbours", region.RegionName, rinfos.Count);
}
else
{
--
cgit v1.1