mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user