[xiph-commits] r8235 - icecast/trunk/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Fri Nov 19 15:04:28 PST 2004
Author: karl
Date: 2004-11-19 15:04:27 -0800 (Fri, 19 Nov 2004)
New Revision: 8235
Modified:
icecast/trunk/icecast/src/admin.c
Log:
skip the listing of the source mountpoint when moveclients is requested
without a destination
Modified: icecast/trunk/icecast/src/admin.c
===================================================================
--- icecast/trunk/icecast/src/admin.c 2004-11-19 22:42:10 UTC (rev 8234)
+++ icecast/trunk/icecast/src/admin.c 2004-11-19 23:04:27 UTC (rev 8235)
@@ -184,7 +184,10 @@
int response, char *xslt_template);
static void html_write(client_t *client, char *fmt, ...);
-xmlDocPtr admin_build_sourcelist(char *current_source)
+/* build an XML doc containing information about currently running sources.
+ * If a mountpoint is passed then that source will not be added to the XML
+ * doc even if the source is running */
+xmlDocPtr admin_build_sourcelist (const char *mount)
{
avl_node *node;
source_t *source;
@@ -197,13 +200,19 @@
xmlnode = xmlNewDocNode(doc, NULL, "icestats", NULL);
xmlDocSetRootElement(doc, xmlnode);
- if (current_source) {
- xmlNewChild(xmlnode, NULL, "current_source", current_source);
+ if (mount) {
+ xmlNewChild(xmlnode, NULL, "current_source", mount);
}
node = avl_get_first(global.source_tree);
while(node) {
source = (source_t *)node->key;
+ if (mount && strcmp (mount, source->mount) == 0)
+ {
+ node = avl_get_next (node);
+ continue;
+ }
+
if (source->running)
{
srcnode = xmlNewChild(xmlnode, NULL, "source", NULL);
More information about the commits
mailing list