[xiph-commits] r8000 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Thu Oct 14 08:54:51 PDT 2004
Author: karl
Date: 2004-10-14 08:54:50 -0700 (Thu, 14 Oct 2004)
New Revision: 8000
Modified:
icecast/branches/kh/icecast/src/admin.c
Log:
make any mounts marked as hidden not show in the streamlist.txt
Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c 2004-10-14 15:45:24 UTC (rev 7999)
+++ icecast/branches/kh/icecast/src/admin.c 2004-10-14 15:54:50 UTC (rev 8000)
@@ -927,18 +927,20 @@
if (response == PLAINTEXT)
{
char buffer [4096], *buf = buffer;
- unsigned remaining = sizeof (buffer);
- int ret = sprintf (buffer,
+ unsigned int remaining = sizeof (buffer);
+ int ret = snprintf (buffer, remaining,
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n");
avl_node *node = avl_get_first(global.source_tree);
while (node && ret > 0 && (unsigned)ret < remaining)
{
source_t *source = (source_t *)node->key;
+ node = avl_get_next(node);
+ if (source->hidden)
+ continue;
remaining -= ret;
buf += ret;
ret = snprintf (buf, remaining, "%s\n", source->mount);
- node = avl_get_next(node);
}
avl_tree_unlock (global.source_tree);
/* handle last line */
More information about the commits
mailing list