From e7c2674dec2c9ea36313b51e7bc604753e16f24f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 26 May 2017 21:26:51 +0100 Subject: cleanup (grid)region info endpoint; add log to try to find some xml decode issues --- OpenSim/Server/Base/ServerUtils.cs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'OpenSim/Server/Base/ServerUtils.cs') diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index b17d7ba..aff6b4f 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs @@ -478,17 +478,22 @@ namespace OpenSim.Server.Base XmlDocument doc = new XmlDocument(); - doc.LoadXml(data); - - XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse"); - - if (rootL.Count != 1) - return ret; + try + { + doc.LoadXml(data); + XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse"); - XmlNode rootNode = rootL[0]; + if (rootL.Count != 1) + return ret; - ret = ParseElement(rootNode); + XmlNode rootNode = rootL[0]; + ret = ParseElement(rootNode); + } + catch (Exception e) + { + m_log.DebugFormat("[serverUtils.ParseXmlResponse]: failed error: {0} \n --- string: {1} - ",e.Message, data); + } return ret; } -- cgit v1.1