From 517a454086281b31be7ca0f4303ab2eef5b0cd5a Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 29 Apr 2009 18:22:49 +0000 Subject: [PATCH] * Apply http://opensimulator.org/mantis/view.php?id=3557 * Stops XmlRpcGroups crashing client sessions if there is an XMLRPC failure * Thanks mcortez --- .../Avatar/XmlRpcGroups/XmlRpcGroupData.cs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs index c3802328ef..e913543ef3 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs @@ -760,7 +760,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups req = new NoKeepAliveXmlRpcRequest(function, parameters); } - XmlRpcResponse resp = req.Send(m_serviceURL, 10000); + XmlRpcResponse resp = null; + + try + { + req.Send(m_serviceURL, 10000); + } + catch (Exception e) + { + m_log.Error("[GROUPS] An error has occured while attempting to access the XmlRpcGroups server"); + m_log.ErrorFormat("[GROUPS] {0} ", e.ToString()); + + foreach (KeyValuePair kvp in param) + { + m_log.WarnFormat("[GROUPS] {0} :: {1}", kvp.Key.ToString(), kvp.Value.ToString()); + } + Hashtable respData = (Hashtable)resp.Value; + respData.Add("error", e.ToString()); + return respData; + } if (resp.Value is Hashtable) {