| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Icecast
Revision: 15122
Author: karl
Date: 18 Jul 2008 21:57:53
Changes:2 on-demand relay fixups.
We prevent a failed relay from restarting too quickly but don't prevent
connecting listeners from getting to the source_t during that time. Drop the
on-demand status in the source_t during this period so listeners are rejected.
The setting is reset from relay eventually.
Relays without matching mount sections had no stats initially.
Files:| ... | ...@@ -367,6 +367,7 @@ | |
| 367 | 367 | source_clear_source (relay->source); |
| 368 | 368 | |
| 369 | 369 | /* cleanup relay, but prevent this relay from starting up again too soon */ |
| 370 | relay->source->on_demand = 0; | |
| 370 | 371 | relay->start = time(NULL) + max_interval; |
| 371 | 372 | relay->cleanup = 1; |
| 372 | 373 | |
| ... | ...@@ -391,7 +392,15 @@ | |
| 391 | 392 | { |
| 392 | 393 | DEBUG1("Adding relay source at mountpoint \"%s\"", relay->localmount); |
| 393 | 394 | if (relay->on_demand) |
| 395 | { | |
| 396 | ice_config_t *config = config_get_config (); | |
| 397 | mount_proxy *mountinfo = config_find_mount (config, relay->localmount); | |
| 398 | if (mountinfo == NULL) | |
| 399 | source_update_settings (config, relay->source, mountinfo); | |
| 400 | config_release_config (); | |
| 401 | stats_event (relay->localmount, "listeners", "0"); | |
| 394 | 402 | slave_update_all_mounts(); |
| 403 | } | |
| 395 | 404 | } |
| 396 | 405 | else |
| 397 | 406 | WARN1 ("new relay but source \"%s\" already exists", relay->localmount); |