More progress on both the Simulation service and the Login service. Both still unfinished.

This commit is contained in:
Diva Canto
2009-12-31 11:42:33 -08:00
parent a8901a40f4
commit f4efa325bb
3 changed files with 429 additions and 2 deletions

View File

@@ -1186,6 +1186,33 @@ namespace OpenSim.Framework
return null;
}
public static OSDMap GetOSDMap(string data)
{
OSDMap args = null;
try
{
OSD buffer;
// We should pay attention to the content-type, but let's assume we know it's Json
buffer = OSDParser.DeserializeJson(data);
if (buffer.Type == OSDType.Map)
{
args = (OSDMap)buffer;
return args;
}
else
{
// uh?
m_log.Debug(("[UTILS]: Got OSD of unexpected type " + buffer.Type.ToString()));
return null;
}
}
catch (Exception ex)
{
m_log.Debug("[UTILS]: exception on GetOSDMap " + ex.Message);
return null;
}
}
public static string[] Glob(string path)
{
string vol=String.Empty;