aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
authorMelanie2010-01-13 03:08:34 +0000
committerMelanie2010-01-13 03:08:34 +0000
commite3a04fcb7b6510b46bc4e24b9a1bc6e321774ac3 (patch)
tree08b7a8beb35f70cfd8f75400a339da37deed61f4 /OpenSim/Server/Handlers
parentMerge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-e3a04fcb7b6510b46bc4e24b9a1bc6e321774ac3.zip
opensim-SC_OLD-e3a04fcb7b6510b46bc4e24b9a1bc6e321774ac3.tar.gz
opensim-SC_OLD-e3a04fcb7b6510b46bc4e24b9a1bc6e321774ac3.tar.bz2
opensim-SC_OLD-e3a04fcb7b6510b46bc4e24b9a1bc6e321774ac3.tar.xz
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.
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs16
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