mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05: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:
parent
06510b997b
commit
1645c82128
@ -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;
|
||||
|
4
src/yp.c
4
src/yp.c
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user