Commit 255af9e6 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Moved <mime-types> into <paths>.

This moved the <mime-types> setting into <paths>. The code still
supports reading it from the root element but will warn the user
about this.

Also there seems to be no documentation about this setting.

Closes: #2164
parent 3dd8bdbf
......@@ -887,6 +887,7 @@ static void _parse_root(xmlDocPtr doc,
xmlFree(configuration->hostname);
configuration->hostname = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
} else if (xmlStrcmp(node->name, XMLSTR("mime-types")) == 0) {
ICECAST_LOG_WARN("<mime-types> has been moved into <paths>. Please update your configuration file.");
if (configuration->mimetypes_fn)
xmlFree(configuration->mimetypes_fn);
configuration->mimetypes_fn = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
......@@ -1900,6 +1901,10 @@ static void _parse_paths(xmlDocPtr doc,
if (configuration->null_device)
xmlFree(configuration->null_device);
configuration->null_device = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
} else if (xmlStrcmp(node->name, XMLSTR("mime-types")) == 0) {
if (configuration->mimetypes_fn)
xmlFree(configuration->mimetypes_fn);
configuration->mimetypes_fn = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
} else if (xmlStrcmp(node->name, XMLSTR("deny-ip")) == 0) {
if (configuration->banfile)
xmlFree(configuration->banfile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment