From eb1169b6ce2ced6deff20b1fce70cc8ee3612731 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Thu, 22 Jun 2023 16:22:02 +0000 Subject: [PATCH] Cleanup: Handle legacy tags and better --- src/cfgfile.c | 6 ++---- src/cfgfile.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cfgfile.c b/src/cfgfile.c index a9df53cc..eb514a29 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -412,7 +412,6 @@ static void _set_defaults(ice_config_t *configuration) configuration->client_limit = CONFIG_DEFAULT_CLIENT_LIMIT; configuration->source_limit = CONFIG_DEFAULT_SOURCE_LIMIT; configuration->queue_size_limit = CONFIG_DEFAULT_QUEUE_SIZE_LIMIT; - configuration->threadpool_size = CONFIG_DEFAULT_THREADPOOL_SIZE; configuration->client_timeout = CONFIG_DEFAULT_CLIENT_TIMEOUT; configuration->header_timeout = CONFIG_DEFAULT_HEADER_TIMEOUT; configuration->source_timeout = CONFIG_DEFAULT_SOURCE_TIMEOUT; @@ -607,9 +606,7 @@ static void _parse_limits(xmlDocPtr doc, xmlNodePtr node, configuration->queue_size_limit = atoi(tmp); if (tmp) xmlFree(tmp); } else if (xmlStrcmp (node->name, XMLSTR("threadpool")) == 0) { - tmp = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1); - configuration->threadpool_size = atoi(tmp); - if (tmp) xmlFree(tmp); + ICECAST_LOG_ERROR("Invalid tag is used. Please remove this tag from your config. No additional changes needed."); } else if (xmlStrcmp (node->name, XMLSTR("client-timeout")) == 0) { tmp = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1); configuration->client_timeout = atoi(tmp); @@ -623,6 +620,7 @@ static void _parse_limits(xmlDocPtr doc, xmlNodePtr node, configuration->source_timeout = atoi(tmp); if (tmp) xmlFree(tmp); } else if (xmlStrcmp (node->name, XMLSTR("burst-on-connect")) == 0) { + ICECAST_LOG_WARN("Deprecated is used. Only use ."); tmp = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1); if (atoi(tmp) == 0) configuration->burst_size = 0; diff --git a/src/cfgfile.h b/src/cfgfile.h index 387aac8f..02a4ddf8 100644 --- a/src/cfgfile.h +++ b/src/cfgfile.h @@ -147,7 +147,6 @@ typedef struct ice_config_tag { int client_limit; int source_limit; unsigned int queue_size_limit; - int threadpool_size; unsigned int burst_size; int client_timeout; int header_timeout;