Commit 7dfcbf56 authored by Karl Heyes's avatar Karl Heyes

skip the listing of the source mountpoint when moveclients is requested

without a destination

svn path=/icecast/trunk/icecast/; revision=8235
parent 889e2604
......@@ -184,7 +184,10 @@ static void admin_send_response(xmlDocPtr doc, client_t *client,
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 @@ xmlDocPtr admin_build_sourcelist(char *current_source)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment