Commit 1645c821 authored by Karl Heyes's avatar Karl Heyes

handle a couple of possible odd misconfiguration cases with YP. Make sure the

peak_listeners stat is shown when relays are inactive.

svn path=/icecast/trunk/icecast/; revision=14934
parent 06510b99
......@@ -940,6 +940,8 @@ static void source_apply_mount (source_t *source, mount_proxy *mountinfo)
DEBUG1("Applying mount information for \"%s\"", source->mount);
avl_tree_rlock (source->client_tree);
stats_event_args (source->mount, "listener_peak", "%lu", source->peak_listeners);
if (mountinfo)
{
source->max_listeners = mountinfo->max_listeners;
......
......@@ -246,6 +246,8 @@ void yp_recheck_config (ice_config_t *config)
destroy_yp_server (server);
break;
}
if (server->url_timeout > 10 || server->url_timeout < 1)
server->url_timeout = 6;
if (server->touch_interval < 30)
server->touch_interval = 30;
curl_easy_setopt (server->curl, CURLOPT_USERAGENT, server->server_id);
......@@ -386,6 +388,8 @@ static int do_yp_add (ypdata_t *yp, char *s, unsigned len)
free (value);
value = stats_get_value (yp->mount, "bitrate");
if (value == NULL)
value = stats_get_value (yp->mount, "ice-bitrate");
add_yp_info (yp, value, YP_BITRATE);
free (value);
......
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