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.
This commit is contained in:
Melanie
2010-01-13 03:08:34 +00:00
parent 1261618216
commit e3a04fcb7b
9 changed files with 58 additions and 33 deletions

View File

@@ -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<string, object> request)
@@ -431,6 +431,11 @@ namespace OpenSim.Server.Handlers.Grid
}
private byte[] FailureResult()
{
return FailureResult(String.Empty);
}
private byte[] FailureResult(string msg)
{
XmlDocument doc = new XmlDocument();
@@ -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);
}