1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-29 04:25:55 -04:00

make recent YP updates follow agreed spec

svn path=/icecast/trunk/icecast/; revision=8479
This commit is contained in:
Karl Heyes 2004-12-17 20:03:26 +00:00
parent 04cc937860
commit a2c849ed7c
2 changed files with 10 additions and 3 deletions

View File

@ -285,7 +285,7 @@ static void update_comments (source_t *source)
int len = strlen (codec_names);
int remaining = sizeof (codec_names) - len;
char *where = codec_names + len;
char *separator = " ";
char *separator = "/";
if (len == 0)
separator = "";
snprintf (where, remaining, "%s%s", separator, codec->name);

View File

@ -401,11 +401,18 @@ static unsigned do_yp_touch (ypdata_t *yp, char *s, unsigned len)
free (max_listeners);
max_listeners = (char *)stats_get_value (NULL, "client_limit");
}
val = stats_get_value (yp->mount, "subtype");
if (val)
{
add_yp_info (yp, "subtype", val, YP_SUBTYPE);
free (val);
}
ret = snprintf (s, len, "action=touch&sid=%s&st=%s"
"&listeners=%u&max_listeners=%s\r\n",
yp->sid, yp->current_song, listeners, max_listeners);
"&listeners=%u&max_listeners=%s&stype=%s\r\n",
yp->sid, yp->current_song, listeners, max_listeners, yp->subtype);
free (max_listeners);
if (ret >= (signed)len)
return ret+1; /* space required for above text and nul*/