1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

* fix bug of not using url decoding value when processing audio_info string

* we now process server name and description if we are not a public stream
* Added quality to status.xsl

svn path=/icecast/trunk/icecast/; revision=8131
This commit is contained in:
oddsock 2004-10-29 15:31:56 +00:00
parent e65325c5a9
commit 6127fea475
2 changed files with 20 additions and 2 deletions

View File

@ -483,6 +483,7 @@ static void source_init (source_t *source)
ice_config_t *config = config_get_config();
char *listenurl, *str;
int listen_url_size;
char *s;
/* 6 for max size of port */
listen_url_size = strlen("http://") + strlen(config->hostname) +
@ -567,8 +568,22 @@ static void source_init (source_t *source)
avl_tree_unlock(global.source_tree);
}
if (source->yp_public)
if (source->yp_public) {
yp_add (source);
}
else {
/* If we are a private server, see if ic*-name and description
is provided, and if so, add them to the stats */
if ((s = httpp_getvar(source->parser, "ice-name"))) {
stats_event (source->mount, "server_name", s);
}
if ((s = httpp_getvar(source->parser, "icy-name"))) {
stats_event (source->mount, "server_name", s);
}
if ((s = httpp_getvar(source->parser, "ice-description"))) {
stats_event (source->mount, "server_description", s);
}
}
}
@ -821,7 +836,7 @@ static void _parse_audio_info (source_t *source, const char *s)
if (esc)
{
util_dict_set (source->audio_info, name, esc);
stats_event (source->mount, name, value);
stats_event (source->mount, name, esc);
free (esc);
}
}

View File

@ -34,6 +34,9 @@
<xsl:if test="bitrate">
<tr><td>Bitrate:</td><td class="streamdata"> <xsl:value-of select="bitrate" /></td></tr>
</xsl:if>
<xsl:if test="quality">
<tr><td>Quality:</td><td class="streamdata"> <xsl:value-of select="quality" /></td></tr>
</xsl:if>
<xsl:if test="listeners">
<tr><td>Stream Listeners:</td><td class="streamdata"> <xsl:value-of select="listeners" /></td></tr>
</xsl:if>