aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Grid
diff options
context:
space:
mode:
authorMelanie2010-01-16 00:05:08 +0000
committerMelanie2010-01-16 00:05:08 +0000
commit10f8c2ea9b67158c32b361f9652d503ea48de292 (patch)
treebe0d88bc4b6df3825a0d27f62a08170d7c7ad262 /OpenSim/Server/Handlers/Grid
parentMerge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/open... (diff)
parentAdd "create user" instructions to README.txt (diff)
downloadopensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.zip
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.gz
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.bz2
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.xz
Merge branch 'master' into presence-refactor
This merge was very conflicted. I think I got them all, but I can't be sure. I had to merge to master or risk divergence to the point of unmergeability.
Diffstat (limited to 'OpenSim/Server/Handlers/Grid')
-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 1601575..318ce85 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
@@ -162,14 +162,14 @@ namespace OpenSim.Server.Handlers.Grid
162 m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); 162 m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e);
163 } 163 }
164 164
165 bool result = false; 165 string result = "Error communicating with grid service";
166 if (rinfo != null) 166 if (rinfo != null)
167 result = m_GridService.RegisterRegion(scopeID, rinfo); 167 result = m_GridService.RegisterRegion(scopeID, rinfo);
168 168
169 if (result) 169 if (result == String.Empty)
170 return SuccessResult(); 170 return SuccessResult();
171 else 171 else
172 return FailureResult(); 172 return FailureResult(result);
173 } 173 }
174 174
175 byte[] Deregister(Dictionary<string, object> request) 175 byte[] Deregister(Dictionary<string, object> request)
@@ -509,6 +509,11 @@ namespace OpenSim.Server.Handlers.Grid
509 509
510 private byte[] FailureResult() 510 private byte[] FailureResult()
511 { 511 {
512 return FailureResult(String.Empty);
513 }
514
515 private byte[] FailureResult(string msg)
516 {
512 XmlDocument doc = new XmlDocument(); 517 XmlDocument doc = new XmlDocument();
513 518
514 XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, 519 XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration,
@@ -526,6 +531,11 @@ namespace OpenSim.Server.Handlers.Grid
526 531
527 rootElement.AppendChild(result); 532 rootElement.AppendChild(result);
528 533
534 XmlElement message = doc.CreateElement("", "Message", "");
535 message.AppendChild(doc.CreateTextNode(msg));
536
537 rootElement.AppendChild(message);
538
529 return DocToBytes(doc); 539 return DocToBytes(doc);
530 } 540 }
531 541