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

Feature: Include node identification for <iceresponse> messages

This commit is contained in:
Philipp Schafft 2020-10-10 08:00:01 +00:00
parent 36ff987e89
commit 4a54efbc46

View File

@ -187,6 +187,8 @@ static void render_node_legacyresponse(json_renderer_t *renderer, xmlDocPtr doc,
const char *nodename = (const char *)node->name;
handled = 1;
if (strcmp(nodename, "iceresponse") == 0) {
json_renderer_begin(renderer, JSON_ELEMENT_TYPE_ARRAY);
handle_node_identification(renderer, "iceresponse", XMLNS_LEGACY_RESPONSE, NULL);
json_renderer_begin(renderer, JSON_ELEMENT_TYPE_OBJECT);
if (node->xmlChildrenNode) {
xmlNodePtr cur = node->xmlChildrenNode;
@ -222,6 +224,7 @@ static void render_node_legacyresponse(json_renderer_t *renderer, xmlDocPtr doc,
} while (cur);
}
json_renderer_end(renderer);
json_renderer_end(renderer);
} else if (strcmp(nodename, "modules") == 0) {
handled = handle_node_modules(renderer, doc, node, parent, cache);
} else {