Skip to content

Commit 255af9e

Browse files
committed
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
1 parent 3dd8bdb commit 255af9e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cfgfile.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ static void _parse_root(xmlDocPtr doc,
887887
xmlFree(configuration->hostname);
888888
configuration->hostname = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
889889
} else if (xmlStrcmp(node->name, XMLSTR("mime-types")) == 0) {
890+
ICECAST_LOG_WARN("<mime-types> has been moved into <paths>. Please update your configuration file.");
890891
if (configuration->mimetypes_fn)
891892
xmlFree(configuration->mimetypes_fn);
892893
configuration->mimetypes_fn = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
@@ -1900,6 +1901,10 @@ static void _parse_paths(xmlDocPtr doc,
19001901
if (configuration->null_device)
19011902
xmlFree(configuration->null_device);
19021903
configuration->null_device = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
1904+
} else if (xmlStrcmp(node->name, XMLSTR("mime-types")) == 0) {
1905+
if (configuration->mimetypes_fn)
1906+
xmlFree(configuration->mimetypes_fn);
1907+
configuration->mimetypes_fn = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
19031908
} else if (xmlStrcmp(node->name, XMLSTR("deny-ip")) == 0) {
19041909
if (configuration->banfile)
19051910
xmlFree(configuration->banfile);

0 commit comments

Comments
 (0)