From 10a23a823edb261af2c0b7895ce0898ea6918ef1 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Nov 2011 01:16:07 +0000 Subject: [PATCH] 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/Data/IRegionData.cs | 4 ++-- OpenSim/Framework/WebUtil.cs | 2 +- .../Region/Framework/Scenes/SceneCommunicationService.cs | 8 ++++++-- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 3 +-- .../Connectors/Simulation/SimulationServiceConnector.cs | 2 +- OpenSim/Services/GridService/GridService.cs | 4 ++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs index 0068daa7c8..546b5e8cba 100644 --- a/OpenSim/Data/IRegionData.cs +++ b/OpenSim/Data/IRegionData.cs @@ -54,12 +54,12 @@ namespace OpenSim.Data /// /// Return the x-coordinate of this region. /// - public int coordX { get { return (sizeX != 0) ? posX / (int)Constants.RegionSize : -1; } } + public int coordX { get { return posX / (int)Constants.RegionSize; } } /// /// Return the y-coordinate of this region. /// - public int coordY { get { return (sizeY != 0) ? posY / (int)Constants.RegionSize : -1; } } + public int coordY { get { return posY / (int)Constants.RegionSize; } } public Dictionary Data; } diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index cafa441289..c6be79e239 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -297,7 +297,7 @@ namespace OpenSim.Framework catch (Exception e) { // don't need to treat this as an error... we're just guessing anyway - m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message); +// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message); } return result; diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 0e22156b75..d76ed3e6d5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -174,7 +174,6 @@ namespace OpenSim.Region.Framework.Scenes { // We're ignoring a collection was modified error because this data gets old and outdated fast. } - } /// @@ -182,13 +181,18 @@ namespace OpenSim.Region.Framework.Scenes /// protected void SendCloseChildAgent(UUID agentID, ulong regionHandle) { - m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle); // let's do our best, but there's not much we can do if the neighbour doesn't accept. //m_commsProvider.InterRegion.TellRegionToCloseChildConnection(regionHandle, agentID); uint x = 0, y = 0; Utils.LongToUInts(regionHandle, out x, out y); + GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); + + m_log.DebugFormat( + "[INTERGRID]: Sending close agent {0} to region at {1}-{2}", + agentID, destination.RegionCoordX, destination.RegionCoordY); + m_scene.SimulationService.CloseAgent(destination, agentID); } diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index e8ae05b8ba..b65a443ad6 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -220,14 +220,13 @@ namespace OpenSim.Server.Handlers.Simulation responsedata["int_response_code"] = HttpStatusCode.OK; responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); - m_log.Debug("[AGENT HANDLER]: Agent Released/Deleted."); + m_log.DebugFormat("[AGENT HANDLER]: Agent {0} Released/Deleted from region {1}", id, regionID); } protected virtual void ReleaseAgent(UUID regionID, UUID id) { m_SimulationService.ReleaseAgent(regionID, id, ""); } - } public class AgentPostHandler : BaseStreamHandler diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 7cbd361f68..c45f456c65 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 eae10e84fb..89f071610d 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 {