1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

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
This commit is contained in:
Karl Heyes 2008-05-21 02:19:47 +00:00
parent 06510b997b
commit 1645c82128
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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);