aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-15 17:24:41 -0800
committerDiva Canto2010-01-15 17:24:41 -0800
commit32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f (patch)
treee20c1afa3edc76101eea15765a447b13b3c4946e /OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
parentComment (diff)
parentMerge branch 'master' into presence-refactor (diff)
downloadopensim-SC-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.zip
opensim-SC-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.tar.gz
opensim-SC-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.tar.bz2
opensim-SC-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.tar.xz
Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/opensim into presence-refactor
Diffstat (limited to 'OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs')
-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