mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
allow <stream-name> to override the icy-name: HTTP header, close #1359
svn path=/icecast/trunk/icecast/; revision=18543
This commit is contained in:
parent
7eb5e1b6e4
commit
8e0777a4bd
17
src/format.c
17
src/format.c
@ -333,7 +333,22 @@ static int format_prepare_headers (source_t *source, client_t *client)
|
||||
if (strcasecmp(var->name, "ice-password") &&
|
||||
strcasecmp(var->name, "icy-metaint"))
|
||||
{
|
||||
if (!strncasecmp("ice-", var->name, 4))
|
||||
if (!strcasecmp(var->name, "ice-name"))
|
||||
{
|
||||
ice_config_t *config;
|
||||
mount_proxy *mountinfo;
|
||||
|
||||
config = config_get_config();
|
||||
mountinfo = config_find_mount (config, source->mount);
|
||||
|
||||
if (mountinfo && mountinfo->stream_name)
|
||||
bytes = snprintf (ptr, remaining, "icy-name:%s\r\n", mountinfo->stream_name);
|
||||
else
|
||||
bytes = snprintf (ptr, remaining, "icy-name:%s\r\n", var->value);
|
||||
|
||||
config_release_config();
|
||||
}
|
||||
else if (!strncasecmp("ice-", var->name, 4))
|
||||
{
|
||||
if (!strcasecmp("ice-public", var->name))
|
||||
bytes = snprintf (ptr, remaining, "icy-pub:%s\r\n", var->value);
|
||||
|
Loading…
Reference in New Issue
Block a user