[xiph-commits] r7861 - icecast/branches/icecast_2_0/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Fri Sep 24 13:15:30 PDT 2004


Author: karl
Date: 2004-09-24 13:15:30 -0700 (Fri, 24 Sep 2004)
New Revision: 7861

Modified:
   icecast/branches/icecast_2_0/src/stats.c
Log:
from trunk code, handle stats better on xsl pages


Modified: icecast/branches/icecast_2_0/src/stats.c
===================================================================
--- icecast/branches/icecast_2_0/src/stats.c	2004-09-24 20:10:58 UTC (rev 7860)
+++ icecast/branches/icecast_2_0/src/stats.c	2004-09-24 20:15:30 UTC (rev 7861)
@@ -730,13 +730,18 @@
 
 
     event = _get_event_from_queue(&queue);
-    while (event) {
-        if (event->source == NULL) {
-            xmlNewChild(node, NULL, event->name, event->value);
-        } else {
+    while (event)
+    {
+        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, event->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