diff options
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 16 |
1 files changed, 13 insertions, 3 deletions
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 | |||
156 | m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); | 156 | m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); |
157 | } | 157 | } |
158 | 158 | ||
159 | bool result = false; | 159 | string result = "Error communicating with grid service"; |
160 | if (rinfo != null) | 160 | if (rinfo != null) |
161 | result = m_GridService.RegisterRegion(scopeID, rinfo); | 161 | result = m_GridService.RegisterRegion(scopeID, rinfo); |
162 | 162 | ||
163 | if (result) | 163 | if (result == String.Empty) |
164 | return SuccessResult(); | 164 | return SuccessResult(); |
165 | else | 165 | else |
166 | return FailureResult(); | 166 | return FailureResult(result); |
167 | } | 167 | } |
168 | 168 | ||
169 | byte[] Deregister(Dictionary<string, object> request) | 169 | byte[] Deregister(Dictionary<string, object> request) |
@@ -432,6 +432,11 @@ namespace OpenSim.Server.Handlers.Grid | |||
432 | 432 | ||
433 | private byte[] FailureResult() | 433 | private byte[] FailureResult() |
434 | { | 434 | { |
435 | return FailureResult(String.Empty); | ||
436 | } | ||
437 | |||
438 | private byte[] FailureResult(string msg) | ||
439 | { | ||
435 | XmlDocument doc = new XmlDocument(); | 440 | XmlDocument doc = new XmlDocument(); |
436 | 441 | ||
437 | XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, | 442 | XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, |
@@ -449,6 +454,11 @@ namespace OpenSim.Server.Handlers.Grid | |||
449 | 454 | ||
450 | rootElement.AppendChild(result); | 455 | rootElement.AppendChild(result); |
451 | 456 | ||
457 | XmlElement message = doc.CreateElement("", "Message", ""); | ||
458 | message.AppendChild(doc.CreateTextNode(msg)); | ||
459 | |||
460 | rootElement.AppendChild(message); | ||
461 | |||
452 | return DocToBytes(doc); | 462 | return DocToBytes(doc); |
453 | } | 463 | } |
454 | 464 | ||