mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
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
This commit is contained in:
parent
3dd8bdbf40
commit
255af9e610
@ -887,6 +887,7 @@ static void _parse_root(xmlDocPtr doc,
|
|||||||
xmlFree(configuration->hostname);
|
xmlFree(configuration->hostname);
|
||||||
configuration->hostname = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
configuration->hostname = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
||||||
} else if (xmlStrcmp(node->name, XMLSTR("mime-types")) == 0) {
|
} 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)
|
if (configuration->mimetypes_fn)
|
||||||
xmlFree(configuration->mimetypes_fn);
|
xmlFree(configuration->mimetypes_fn);
|
||||||
configuration->mimetypes_fn = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
configuration->mimetypes_fn = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
||||||
@ -1900,6 +1901,10 @@ static void _parse_paths(xmlDocPtr doc,
|
|||||||
if (configuration->null_device)
|
if (configuration->null_device)
|
||||||
xmlFree(configuration->null_device);
|
xmlFree(configuration->null_device);
|
||||||
configuration->null_device = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
|
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) {
|
} else if (xmlStrcmp(node->name, XMLSTR("deny-ip")) == 0) {
|
||||||
if (configuration->banfile)
|
if (configuration->banfile)
|
||||||
xmlFree(configuration->banfile);
|
xmlFree(configuration->banfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user