* Rather than crash the region simulator, declare the teleport a failure if the "success" mapping doesn't exist. (also; I hate LLSD.)

0.6.5-rc1
Adam Frisby 2009-05-10 21:35:07 +00:00
parent dd8c01d7a7
commit 54ab7d7ceb
1 changed files with 13 additions and 6 deletions

View File

@ -123,14 +123,21 @@ namespace OpenSim.Framework.Communications.Clients
m_log.InfoFormat("[REST COMMS]: DoCreateChildAgentCall reply was {0} ", response); m_log.InfoFormat("[REST COMMS]: DoCreateChildAgentCall reply was {0} ", response);
if (!String.IsNullOrEmpty(response)) if (!String.IsNullOrEmpty(response))
{
try
{ {
// we assume we got an OSDMap back // we assume we got an OSDMap back
OSDMap r = GetOSDMap(response); OSDMap r = GetOSDMap(response);
bool success = r["success"].AsBoolean(); bool success = r["success"].AsBoolean();
reason = r["reason"].AsString(); reason = r["reason"].AsString();
return success; return success;
} }
catch (NullReferenceException e)
{
m_log.InfoFormat("[REST COMMS]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
return false;
}
}
} }
} }
catch (WebException ex) catch (WebException ex)