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

skip the listing of the source mountpoint when moveclients is requested

without a destination

svn path=/icecast/trunk/icecast/; revision=8235
This commit is contained in:
Karl Heyes 2004-11-19 23:04:27 +00:00
parent 889e260490
commit 7dfcbf560c

View File

@ -184,7 +184,10 @@ static void admin_send_response(xmlDocPtr doc, client_t *client,
int response, char *xslt_template); int response, char *xslt_template);
static void html_write(client_t *client, char *fmt, ...); 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; avl_node *node;
source_t *source; source_t *source;
@ -197,13 +200,19 @@ xmlDocPtr admin_build_sourcelist(char *current_source)
xmlnode = xmlNewDocNode(doc, NULL, "icestats", NULL); xmlnode = xmlNewDocNode(doc, NULL, "icestats", NULL);
xmlDocSetRootElement(doc, xmlnode); xmlDocSetRootElement(doc, xmlnode);
if (current_source) { if (mount) {
xmlNewChild(xmlnode, NULL, "current_source", current_source); xmlNewChild(xmlnode, NULL, "current_source", mount);
} }
node = avl_get_first(global.source_tree); node = avl_get_first(global.source_tree);
while(node) { while(node) {
source = (source_t *)node->key; source = (source_t *)node->key;
if (mount && strcmp (mount, source->mount) == 0)
{
node = avl_get_next (node);
continue;
}
if (source->running) if (source->running)
{ {
srcnode = xmlNewChild(xmlnode, NULL, "source", NULL); srcnode = xmlNewChild(xmlnode, NULL, "source", NULL);