mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
on simple cases no need to parse at all
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -154,20 +154,10 @@ namespace OpenSim.Services.Connectors
|
||||
string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth);
|
||||
if (reply != string.Empty)
|
||||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if (replyData.ContainsKey("result"))
|
||||
{
|
||||
if (replyData["result"].ToString().ToLower() == "success")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: StoreAgentPreferences reply data does not contain result field");
|
||||
}
|
||||
|
||||
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||
if (indx > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: StoreAgentPreferences received empty reply");
|
||||
|
||||
@@ -148,8 +148,7 @@ namespace OpenSim.Services.Connectors
|
||||
m_ServerURI + "/auth/plain",
|
||||
ServerUtils.BuildQueryString(sendData), m_Auth);
|
||||
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
|
||||
reply);
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if (replyData["Result"].ToString() != "Success")
|
||||
return false;
|
||||
|
||||
@@ -157,17 +157,10 @@ namespace OpenSim.Services.Connectors
|
||||
string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, reqString, m_Auth);
|
||||
if (reply != string.Empty)
|
||||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if (replyData.ContainsKey("result"))
|
||||
{
|
||||
if (replyData["result"].ToString().ToLower() == "success")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} reply data does not contain result field", meth);
|
||||
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||
if (indx > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} received empty reply", meth);
|
||||
|
||||
@@ -111,18 +111,10 @@ namespace OpenSim.Services.Connectors
|
||||
m_Auth);
|
||||
if (reply != string.Empty)
|
||||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if (replyData.ContainsKey("result"))
|
||||
{
|
||||
if (replyData["result"].ToString().ToLower() == "success")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LoginAgent reply data does not contain result field");
|
||||
|
||||
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||
if (indx > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LoginAgent received empty reply");
|
||||
@@ -155,20 +147,13 @@ namespace OpenSim.Services.Connectors
|
||||
uri,
|
||||
reqString,
|
||||
m_Auth);
|
||||
|
||||
if (reply != string.Empty)
|
||||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if (replyData.ContainsKey("result"))
|
||||
{
|
||||
if (replyData["result"].ToString().ToLower() == "success")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutAgent reply data does not contain result field");
|
||||
|
||||
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||
if (indx > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutAgent received empty reply");
|
||||
@@ -202,18 +187,10 @@ namespace OpenSim.Services.Connectors
|
||||
m_Auth);
|
||||
if (reply != string.Empty)
|
||||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if (replyData.ContainsKey("result"))
|
||||
{
|
||||
if (replyData["result"].ToString().ToLower() == "success")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutRegionAgents reply data does not contain result field");
|
||||
|
||||
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||
if (indx > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutRegionAgents received empty reply");
|
||||
|
||||
@@ -469,7 +469,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
|
||||
try
|
||||
{
|
||||
OSDMap args = new OSDMap(2);
|
||||
OSDMap args = new OSDMap(16);
|
||||
|
||||
args["sog"] = OSD.FromString(sog.ToXml2());
|
||||
args["extra"] = OSD.FromString(sog.ExtraToXmlString());
|
||||
|
||||
Reference in New Issue
Block a user