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. --- .../Services/Connectors/Grid/GridServiceConnector.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index 99aa3fb..1ba7344 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors #region IGridService - public virtual bool RegisterRegion(UUID scopeID, GridRegion regionInfo) + public virtual string RegisterRegion(UUID scopeID, GridRegion regionInfo) { Dictionary rinfo = regionInfo.ToKeyValuePairs(); Dictionary sendData = new Dictionary(); @@ -110,11 +110,23 @@ namespace OpenSim.Services.Connectors Dictionary replyData = ServerUtils.ParseXmlResponse(reply); if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success")) - return true; + { + return String.Empty; + } + else if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "failure")) + { + m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); + return replyData["Message"].ToString(); + } else if (!replyData.ContainsKey("Result")) + { m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field"); + } else + { m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); + return "Unexpected result "+replyData["Result"].ToString(); + } } else @@ -125,7 +137,7 @@ namespace OpenSim.Services.Connectors m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); } - return false; + return "Error communicating with grid service"; } public virtual bool DeregisterRegion(UUID regionID) -- cgit v1.1