From edaf0a98d6e23932139920fe1999f94e9601483e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Oct 2013 23:37:22 +0000 Subject: Give the caller AddMapTile a valid reason response if this failed due to blank response from server or connection failure. Raise log lines which indicate problems to warning from debug --- .../Connectors/MapImage/MapImageServicesConnector.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs index 30bfb70..cc485f7 100644 --- a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs +++ b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs @@ -114,29 +114,32 @@ namespace OpenSim.Services.Connectors } else if (replyData.ContainsKey("Result") && (replyData["Result"].ToString().ToLower() == "failure")) { - m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Registration failed: {0}", replyData["Message"].ToString()); - reason = replyData["Message"].ToString(); + reason = string.Format("Map post to {0} failed: {1}", uri, replyData["Message"].ToString()); + m_log.WarnFormat("[MAP IMAGE CONNECTOR]: {0}", reason); + return false; } else if (!replyData.ContainsKey("Result")) { - m_log.DebugFormat("[MAP IMAGE CONNECTOR]: reply data does not contain result field"); + reason = string.Format("Reply data from {0} does not contain result field", uri); + m_log.WarnFormat("[MAP IMAGE CONNECTOR]: {0}", reason); } else { - m_log.DebugFormat("[MAP IMAGE CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); - reason = "Unexpected result " + replyData["Result"].ToString(); + reason = string.Format("Unexpected result {0} from {1}" + replyData["Result"].ToString(), uri); + m_log.WarnFormat("[MAP IMAGE CONNECTOR]: {0}", reason); } - } else { - m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Map post received null reply"); + reason = string.Format("Map post received null reply from {0}", uri); + m_log.WarnFormat("[MAP IMAGE CONNECTOR]: {0}", reason); } } catch (Exception e) { - m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Exception when contacting map server at {0}: {1}", uri, e.Message); + reason = string.Format("Exception when posting to map server at {0}: {1}", uri, e.Message); + m_log.WarnFormat("[MAP IMAGE CONNECTOR]: {0}", reason); } finally { -- cgit v1.1