More plumbing on agent states

0.8.2-post-fixes
Melanie Thielker 2015-08-20 00:40:49 +02:00
parent e1a455eae5
commit 17e920aacd
2 changed files with 17 additions and 0 deletions

View File

@ -174,6 +174,12 @@ namespace OpenSim.Server.Handlers.Simulation
resp["reason"] = OSD.FromString(reason);
resp["version"] = OSD.FromString(version);
OSDArray featuresWanted = new OSDArray();
foreach (UUID feature in features)
featuresWanted.Add(OSD.FromString(feature.ToString()));
resp["features"] = featuresWanted;
// We must preserve defaults here, otherwise a false "success" will not be put into the JSON map!
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);

View File

@ -356,6 +356,17 @@ namespace OpenSim.Services.Connectors.Simulation
return false;
}
featuresAvailable.Clear();
if (result.ContainsKey("features"))
{
OSDArray array = (OSDArray)result["features"];
foreach (OSD o in array)
featuresAvailable.Add(new UUID(o.AsString()));
}
return success;
}
catch (Exception e)