mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05:00
Feature: Check if client_limit is reasonable bigger than source_limit
This commit is contained in:
parent
1abcc9a4f6
commit
35a9b743ab
@ -1549,6 +1549,8 @@ static void command_dashboard (client_t *client, source_t *source, adm
|
||||
__reportxml_add_maintenance(reportnode, config->reportxml_db, "b6224fc4-53a1-433f-a6cd-d5b85c60f1c9", "error", "Obsolete tags are used in the config file. See the error.log for details and update your configuration accordingly.", NULL);
|
||||
if (config->config_problems & CONFIG_PROBLEM_INVALID_NODE)
|
||||
__reportxml_add_maintenance(reportnode, config->reportxml_db, "0f6f757d-52d8-4b9a-8e57-9bcd528fffba", "error", "Invalid tags are used in the config file. See the error.log for details and update your configuration accordingly.", NULL);
|
||||
if (config->config_problems & CONFIG_PROBLEM_VALIDATION)
|
||||
__reportxml_add_maintenance(reportnode, config->reportxml_db, "8fc33086-274d-4ccb-b32f-599b3fa0f41a", "error", "The configuration did not validate. See the error.log for details and update your configuration accordingly.", NULL);
|
||||
|
||||
if (!has_sources)
|
||||
__reportxml_add_maintenance(reportnode, config->reportxml_db, "f68dd8a3-22b1-4118-aba6-b039f2c5b51e", "info", "Currently no sources are connected to this server.", NULL);
|
||||
|
@ -1040,6 +1040,12 @@ int config_parse_file(const char *filename, ice_config_t *configuration)
|
||||
_parse_root(doc, node->xmlChildrenNode, configuration);
|
||||
xmlFreeDoc(doc);
|
||||
_merge_mounts_all(configuration);
|
||||
|
||||
if (configuration->client_limit <= (configuration->source_limit*2)) {
|
||||
configuration->config_problems |= CONFIG_PROBLEM_VALIDATION;
|
||||
ICECAST_LOG_ERROR("Client limit (%i) is too small for given source limit (%i)", configuration->client_limit, configuration->source_limit);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#define CONFIG_PROBLEM_UNKNOWN_NODE 0x0010U
|
||||
#define CONFIG_PROBLEM_OBSOLETE_NODE 0x0020U
|
||||
#define CONFIG_PROBLEM_INVALID_NODE 0x0040U
|
||||
#define CONFIG_PROBLEM_VALIDATION 0x0080U
|
||||
|
||||
typedef enum _http_header_type {
|
||||
/* static: headers are passed as is to the client. */
|
||||
|
Loading…
Reference in New Issue
Block a user