on simple cases no need to parse at all

This commit is contained in:
UbitUmarov
2020-06-04 02:50:39 +01:00
parent 84a3ff37ab
commit 7a07731371
6 changed files with 28 additions and 73 deletions

View File

@@ -199,20 +199,16 @@ namespace OpenSim.Region.CoreModules.World.Estate
string reply = SynchronousRestFormsRequester.MakeRequest("POST",
url + "estate",
reqString);
if (reply != string.Empty)
{
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
if (replyData.ContainsKey("RESULT"))
if (reply != string.Empty)
{
if (replyData["RESULT"].ToString().ToLower() == "true")
int indx = reply.IndexOf("true", StringComparison.InvariantCultureIgnoreCase);
if (indx > 0)
return true;
else
return false;
return false;
}
else
m_log.DebugFormat("[XESTATE CONNECTOR]: reply data does not contain result field");
}
else
m_log.DebugFormat("[XESTATE CONNECTOR]: received empty reply");