1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

Fix: Export xmlns as namespace not property

This commit is contained in:
Philipp Schafft 2020-10-04 12:27:22 +00:00
parent 7b5f52d77d
commit 34fa9f0ce3

View File

@ -605,6 +605,7 @@ xmlNodePtr reportxml_node_render_xmlnode(reportxml_node_t *node)
ssize_t xml_child_count;
size_t i;
xmlChar *definition;
xmlChar *xmlns;
if (!node)
return NULL;
@ -628,6 +629,15 @@ xmlNodePtr reportxml_node_render_xmlnode(reportxml_node_t *node)
xmlFree(definition);
}
xmlns = xmlGetProp(ret, XMLSTR("xmlns"));
if (xmlns) {
xmlNsPtr ns;
xmlUnsetProp(ret, XMLSTR("xmlns"));
ns = xmlNewNs(ret, xmlns, NULL);
xmlSetNs(ret, ns);
xmlFree(xmlns);
}
for (i = 0; i < (size_t)child_count; i++) {
reportxml_node_t *child = reportxml_node_get_child(node, i);
xmlNodePtr xmlchild;