on simple cases no need to parse at all
parent
84a3ff37ab
commit
7a07731371
|
@ -199,20 +199,16 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
string reply = SynchronousRestFormsRequester.MakeRequest("POST",
|
string reply = SynchronousRestFormsRequester.MakeRequest("POST",
|
||||||
url + "estate",
|
url + "estate",
|
||||||
reqString);
|
reqString);
|
||||||
|
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
if (reply != string.Empty)
|
||||||
|
|
||||||
if (replyData.ContainsKey("RESULT"))
|
|
||||||
{
|
{
|
||||||
if (replyData["RESULT"].ToString().ToLower() == "true")
|
int indx = reply.IndexOf("true", StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
if (indx > 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_log.DebugFormat("[XESTATE CONNECTOR]: reply data does not contain result field");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[XESTATE CONNECTOR]: received empty reply");
|
m_log.DebugFormat("[XESTATE CONNECTOR]: received empty reply");
|
||||||
|
|
|
@ -154,21 +154,11 @@ namespace OpenSim.Services.Connectors
|
||||||
string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth);
|
string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth);
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
if (indx > 0)
|
||||||
if (replyData.ContainsKey("result"))
|
|
||||||
{
|
|
||||||
if (replyData["result"].ToString().ToLower() == "success")
|
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: StoreAgentPreferences reply data does not contain result field");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: StoreAgentPreferences received empty reply");
|
m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: StoreAgentPreferences received empty reply");
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,8 +148,7 @@ namespace OpenSim.Services.Connectors
|
||||||
m_ServerURI + "/auth/plain",
|
m_ServerURI + "/auth/plain",
|
||||||
ServerUtils.BuildQueryString(sendData), m_Auth);
|
ServerUtils.BuildQueryString(sendData), m_Auth);
|
||||||
|
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
|
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||||
reply);
|
|
||||||
|
|
||||||
if (replyData["Result"].ToString() != "Success")
|
if (replyData["Result"].ToString() != "Success")
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -157,18 +157,11 @@ namespace OpenSim.Services.Connectors
|
||||||
string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, reqString, m_Auth);
|
string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, reqString, m_Auth);
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
if (indx > 0)
|
||||||
if (replyData.ContainsKey("result"))
|
|
||||||
{
|
|
||||||
if (replyData["result"].ToString().ToLower() == "success")
|
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} reply data does not contain result field", meth);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} received empty reply", meth);
|
m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} received empty reply", meth);
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,19 +111,11 @@ namespace OpenSim.Services.Connectors
|
||||||
m_Auth);
|
m_Auth);
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
if (indx > 0)
|
||||||
if (replyData.ContainsKey("result"))
|
|
||||||
{
|
|
||||||
if (replyData["result"].ToString().ToLower() == "success")
|
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LoginAgent reply data does not contain result field");
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LoginAgent received empty reply");
|
m_log.DebugFormat("[PRESENCE CONNECTOR]: LoginAgent received empty reply");
|
||||||
}
|
}
|
||||||
|
@ -155,21 +147,14 @@ namespace OpenSim.Services.Connectors
|
||||||
uri,
|
uri,
|
||||||
reqString,
|
reqString,
|
||||||
m_Auth);
|
m_Auth);
|
||||||
|
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
if (indx > 0)
|
||||||
if (replyData.ContainsKey("result"))
|
|
||||||
{
|
|
||||||
if (replyData["result"].ToString().ToLower() == "success")
|
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutAgent reply data does not contain result field");
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutAgent received empty reply");
|
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutAgent received empty reply");
|
||||||
}
|
}
|
||||||
|
@ -202,19 +187,11 @@ namespace OpenSim.Services.Connectors
|
||||||
m_Auth);
|
m_Auth);
|
||||||
if (reply != string.Empty)
|
if (reply != string.Empty)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
int indx = reply.IndexOf("success", StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
if (indx > 0)
|
||||||
if (replyData.ContainsKey("result"))
|
|
||||||
{
|
|
||||||
if (replyData["result"].ToString().ToLower() == "success")
|
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutRegionAgents reply data does not contain result field");
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutRegionAgents received empty reply");
|
m_log.DebugFormat("[PRESENCE CONNECTOR]: LogoutRegionAgents received empty reply");
|
||||||
}
|
}
|
||||||
|
|
|
@ -469,7 +469,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OSDMap args = new OSDMap(2);
|
OSDMap args = new OSDMap(16);
|
||||||
|
|
||||||
args["sog"] = OSD.FromString(sog.ToXml2());
|
args["sog"] = OSD.FromString(sog.ToXml2());
|
||||||
args["extra"] = OSD.FromString(sog.ExtraToXmlString());
|
args["extra"] = OSD.FromString(sog.ExtraToXmlString());
|
||||||
|
|
Loading…
Reference in New Issue