From e3a04fcb7b6510b46bc4e24b9a1bc6e321774ac3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 13 Jan 2010 03:08:34 +0000 Subject: Change the error messages on region region registration. This changes URM and region. The non-error case should be compatible, so no version bump. Untested. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index d99b791..85a8738 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -156,14 +156,14 @@ namespace OpenSim.Server.Handlers.Grid m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); } - bool result = false; + string result = "Error communicating with grid service"; if (rinfo != null) result = m_GridService.RegisterRegion(scopeID, rinfo); - if (result) + if (result == String.Empty) return SuccessResult(); else - return FailureResult(); + return FailureResult(result); } byte[] Deregister(Dictionary request) @@ -432,6 +432,11 @@ namespace OpenSim.Server.Handlers.Grid private byte[] FailureResult() { + return FailureResult(String.Empty); + } + + private byte[] FailureResult(string msg) + { XmlDocument doc = new XmlDocument(); XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, @@ -449,6 +454,11 @@ namespace OpenSim.Server.Handlers.Grid rootElement.AppendChild(result); + XmlElement message = doc.CreateElement("", "Message", ""); + message.AppendChild(doc.CreateTextNode(msg)); + + rootElement.AppendChild(message); + return DocToBytes(doc); } -- cgit v1.1