Merge branch 'master' of /home/opensim/lib/osgrid/opensim
commit
939d60da59
|
@ -37,6 +37,7 @@ using Nini.Config;
|
|||
using Nwc.XmlRpc;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Server.Handlers.Grid
|
||||
{
|
||||
|
@ -142,5 +143,19 @@ namespace OpenSim.Server.Handlers.Grid
|
|||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public string JsonGetGridInfoMethod(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
|
||||
OSDMap map = new OSDMap();
|
||||
|
||||
foreach (string k in _info.Keys)
|
||||
{
|
||||
map[k] = OSD.FromString(_info[k].ToString());
|
||||
}
|
||||
|
||||
return OSDParser.SerializeJsonString(map).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ namespace OpenSim.Server.Handlers.Grid
|
|||
|
||||
server.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info",
|
||||
handlers.RestGetGridInfoMethod));
|
||||
server.AddStreamHandler(new RestStreamHandler("GET", "/json_grid_info",
|
||||
handlers.JsonGetGridInfoMethod));
|
||||
server.AddXmlRPCHandler("get_grid_info", handlers.XmlRpcGridInfoMethod);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue