Package: icecast2 Version: 2.3.1-5 Severity: normal Tags: patch
When <mount> tags are missing in config, then http://<icecast server>:<port>/admin/streamlist.txt returns empty file, ever it has same sources active. It makes feature "master-slave relay" unusable. Patch fixes this problem by making streamlist.txt generation similar way with streamlist.xsl generation (by avl tree "global.source_tree" iterating). -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.19 Locale: LANG=be_BY.CP1251, LC_CTYPE=be_BY.CP1251 (charmap=CP1251) Versions of packages icecast2 depends on: ii adduser 3.101 Add and remove users and groups ii libc6 2.3.6.ds1-9 GNU C Library: Shared libraries ii libcomer 1.39+1.40-WIP-2006.11.14+dfsg-1 common error description library ii libcurl3 7.15.5-1 Multi-protocol file transfer libra ii libgnutl 1.4.4-3 the GNU TLS library - runtime libr ii libidn11 0.6.5-1 GNU libidn library, implementation ii libkrb53 1.4.4-5 MIT Kerberos runtime libraries ii libogg0 1.1.3-2 Ogg Bitstream Library ii libspeex 1.1.12-3 The Speex Speech Codec ii libtheor 0.0.0.alpha7.dfsg-1.1 The Theora Video Compression Codec ii libvorbi 1.1.2.dfsg-1.2 The Vorbis General Audio Compressi ii libxml2 2.6.27.dfsg-1 GNOME XML library ii libxslt1 1.1.19-1 XSLT processing library - runtime ii zlib1g 1:1.2.3-13 compression library - runtime Versions of packages icecast2 recommends: ii ices2 2.0.1-5 Ogg Vorbis streaming source for Ic -- no debconf information
--- 1/icecast2-2.3.1/src/admin.c 2005-09-13 01:50:48.000000000 +0300 +++ icecast2-2.3.1/src/admin.c 2007-01-03 15:07:18.000000000 +0200 @@ -974,34 +974,32 @@ char *buf; int remaining = PER_CLIENT_REFBUF_SIZE; int ret; - ice_config_t *config = config_get_config (); - mount_proxy *mountinfo = config->mounts; + avl_node *node; + source_t *source; + buf = client->refbuf->data; ret = snprintf (buf, remaining, "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"); - while (mountinfo && ret > 0 && ret < remaining) + node = avl_get_first(global.source_tree); + while (node && ret > 0 && ret < remaining) { - mount_proxy *current = mountinfo; - source_t *source; - mountinfo = mountinfo->next; - /* now check that a source is available */ - source = source_find_mount (current->mountname); + source = (source_t *)node->key; + node = avl_get_next(node); if (source == NULL) continue; - if (source->running == 0 && source->on_demand == 0) + if (source->running == 0 && source->on_demand == 0) continue; if (source->hidden) continue; remaining -= ret; buf += ret; - ret = snprintf (buf, remaining, "%s\n", current->mountname); + ret = snprintf (buf, remaining, "%s\n", source->mount); } avl_tree_unlock (global.source_tree); - config_release_config(); /* handle last line */ if (ret > 0 && ret < remaining)