[xiph-commits] r7478 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl
Thu Aug 5 19:10:47 PDT 2004
Author: karl
Date: Thu Aug 5 19:10:47 2004
New Revision: 7478
Modified:
icecast/branches/kh/icecast/src/stats.c
Log:
missing xsl code, don't let stats get processed without having
any XML entities encoded. Apply to both the name and value just
for consistency
Modified: icecast/branches/kh/icecast/src/stats.c
===================================================================
--- icecast/branches/kh/icecast/src/stats.c 2004-08-04 14:12:43 UTC (rev 7477)
+++ icecast/branches/kh/icecast/src/stats.c 2004-08-04 16:02:36 UTC (rev 7478)
@@ -739,16 +739,16 @@
event = _get_event_from_queue(&queue);
while (event) {
- if (event->source == NULL) {
- xmlChar *value = xmlEncodeEntitiesReentrant (doc, event->value);
- xmlNewChild(node, NULL, event->name, value);
- xmlFree (value);
- } else {
- xmlChar *value = xmlEncodeEntitiesReentrant (doc, event->value);
+ xmlChar *name, *value;
+ name = xmlEncodeEntitiesReentrant (*doc, event->name);
+ value = xmlEncodeEntitiesReentrant (*doc, event->value);
+ srcnode = node;
+ if (event->source) {
srcnode = _find_xml_node(event->source, &src_nodes, node);
- xmlNewChild(srcnode, NULL, event->name, value);
- xmlFree (value);
}
+ xmlNewChild(srcnode, NULL, name, value);
+ xmlFree (value);
+ xmlFree (name);
_free_event(event);
event = _get_event_from_queue(&queue);
More information about the commits
mailing list