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

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) ...@@ -494,15 +494,18 @@ static void source_init (source_t *source)
config->hostname, config->port, source->mount); config->hostname, config->port, source->mount);
config_release_config(); config_release_config();
/* maybe better in connection.c */ do
if ((str = httpp_getvar(source->parser, "ice-public"))) {
source->yp_public = atoi(str); if ((str = httpp_getvar(source->parser, "ice-public")))
if ((str = httpp_getvar(source->parser, "icy-pub"))) break;
source->yp_public = atoi(str); if ((str = httpp_getvar(source->parser, "icy-pub")))
if ((str = httpp_getvar(source->parser, "icy-public"))) break;
source->yp_public = atoi(str); /* handle header from icecast v2 release */
if (str == NULL) if ((str = httpp_getvar(source->parser, "icy-public")))
str = "0"; break;
str = "0";
} while (0);
source->yp_public = atoi (str);
stats_event (source->mount, "public", str); stats_event (source->mount, "public", str);
str = httpp_getvar(source->parser, "ice-audio-info"); 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