1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Feature: Added node for node identification

This commit is contained in:
Philipp Schafft 2020-10-09 19:40:52 +00:00
parent f52d7ae077
commit a8a3207cce

View File

@ -303,8 +303,15 @@ static void render_node_legacystats(json_renderer_t *renderer, xmlDocPtr doc, xm
nodelist_init(&nodelist);
if (is_icestats)
if (is_icestats) {
json_renderer_begin(renderer, JSON_ELEMENT_TYPE_ARRAY);
json_renderer_begin(renderer, JSON_ELEMENT_TYPE_OBJECT);
json_renderer_write_key(renderer, "name", JSON_RENDERER_FLAGS_NONE);
json_renderer_write_string(renderer, "icestats", JSON_RENDERER_FLAGS_NONE);
json_renderer_write_key(renderer, "ns", JSON_RENDERER_FLAGS_NONE);
json_renderer_write_string(renderer, "http://icecast.org/specs/legacystats-0.0.1", JSON_RENDERER_FLAGS_NONE);
json_renderer_end(renderer);
}
json_renderer_begin(renderer, JSON_ELEMENT_TYPE_OBJECT);
if (node->xmlChildrenNode) {
xmlNodePtr cur = node->xmlChildrenNode;