Thank you very much, Diva for a patch to increase the

grid server reliability.
ThreadPoolClientBranch
Charles Krinke 2008-02-17 02:03:27 +00:00
parent 9e828ab168
commit df04345e3f
1 changed files with 24 additions and 14 deletions

View File

@ -680,29 +680,39 @@ namespace OpenSim.Grid.GridServer
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <param name="path"></param> /// <param name="path"></param>
/// <param name="param"></param> /// <param name="param">A string representing the sim's UUID</param>
/// <returns>Information about the sim in XML</returns> /// <returns>Information about the sim in XML</returns>
public string RestGetSimMethod(string request, string path, string param) public string RestGetSimMethod(string request, string path, string param)
{ {
string respstring = String.Empty; string respstring = String.Empty;
RegionProfileData TheSim; RegionProfileData TheSim;
LLUUID UUID = new LLUUID(param);
TheSim = getRegion(UUID);
if (!(TheSim == null)) LLUUID UUID;
if (LLUUID.TryParse(param, out UUID))
{
TheSim = getRegion(UUID);
if (!(TheSim == null))
{
respstring = "<Root>";
respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
respstring += "<sim>";
respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
respstring += "<regionname>" + TheSim.regionName + "</regionname>";
respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>";
respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
respstring += "<estate_id>1</estate_id>";
respstring += "</sim>";
respstring += "</Root>";
}
}
else
{ {
respstring = "<Root>"; respstring = "<Root>";
respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>"; respstring += "<error>Param must be a UUID</error>";
respstring += "<sim>";
respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
respstring += "<regionname>" + TheSim.regionName + "</regionname>";
respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>";
respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
respstring += "<estate_id>1</estate_id>";
respstring += "</sim>";
respstring += "</Root>"; respstring += "</Root>";
} }