Commit 82c116a7 authored by Karl Heyes's avatar Karl Heyes

the check for the public stream flag wasn't working correctly in all cases

svn path=/icecast/trunk/icecast/; revision=8100
parent 1531b5a4
......@@ -494,15 +494,18 @@ static void source_init (source_t *source)
config->hostname, config->port, source->mount);
config_release_config();
/* maybe better in connection.c */
if ((str = httpp_getvar(source->parser, "ice-public")))
source->yp_public = atoi(str);
if ((str = httpp_getvar(source->parser, "icy-pub")))
source->yp_public = atoi(str);
if ((str = httpp_getvar(source->parser, "icy-public")))
source->yp_public = atoi(str);
if (str == NULL)
str = "0";
do
{
if ((str = httpp_getvar(source->parser, "ice-public")))
break;
if ((str = httpp_getvar(source->parser, "icy-pub")))
break;
/* handle header from icecast v2 release */
if ((str = httpp_getvar(source->parser, "icy-public")))
break;
str = "0";
} while (0);
source->yp_public = atoi (str);
stats_event (source->mount, "public", str);
str = httpp_getvar(source->parser, "ice-audio-info");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment