aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-02-17 02:03:27 +0000
committerCharles Krinke2008-02-17 02:03:27 +0000
commitdf04345e3f0f1ca964085445f1e0d924bad44654 (patch)
tree1527558b338643073113d88810c4558d8696f286 /OpenSim
parentThank you very much, Taoki for additions to pCampBot to improve walking, talking (diff)
downloadopensim-SC-df04345e3f0f1ca964085445f1e0d924bad44654.zip
opensim-SC-df04345e3f0f1ca964085445f1e0d924bad44654.tar.gz
opensim-SC-df04345e3f0f1ca964085445f1e0d924bad44654.tar.bz2
opensim-SC-df04345e3f0f1ca964085445f1e0d924bad44654.tar.xz
Thank you very much, Diva for a patch to increase the
grid server reliability.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs38
1 files changed, 24 insertions, 14 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 1c8972e..5cd83ea 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -680,29 +680,39 @@ namespace OpenSim.Grid.GridServer
680 /// </summary> 680 /// </summary>
681 /// <param name="request"></param> 681 /// <param name="request"></param>
682 /// <param name="path"></param> 682 /// <param name="path"></param>
683 /// <param name="param"></param> 683 /// <param name="param">A string representing the sim's UUID</param>
684 /// <returns>Information about the sim in XML</returns> 684 /// <returns>Information about the sim in XML</returns>
685 public string RestGetSimMethod(string request, string path, string param) 685 public string RestGetSimMethod(string request, string path, string param)
686 { 686 {
687 string respstring = String.Empty; 687 string respstring = String.Empty;
688 688
689 RegionProfileData TheSim; 689 RegionProfileData TheSim;
690 LLUUID UUID = new LLUUID(param);
691 TheSim = getRegion(UUID);
692 690
693 if (!(TheSim == null)) 691 LLUUID UUID;
692 if (LLUUID.TryParse(param, out UUID))
693 {
694 TheSim = getRegion(UUID);
695
696 if (!(TheSim == null))
697 {
698 respstring = "<Root>";
699 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
700 respstring += "<sim>";
701 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
702 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
703 respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>";
704 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
705 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
706 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
707 respstring += "<estate_id>1</estate_id>";
708 respstring += "</sim>";
709 respstring += "</Root>";
710 }
711 }
712 else
694 { 713 {
695 respstring = "<Root>"; 714 respstring = "<Root>";
696 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>"; 715 respstring += "<error>Param must be a UUID</error>";
697 respstring += "<sim>";
698 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
699 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
700 respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>";
701 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
702 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
703 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
704 respstring += "<estate_id>1</estate_id>";
705 respstring += "</sim>";
706 respstring += "</Root>"; 716 respstring += "</Root>";
707 } 717 }
708 718