Commit cf419cc1 authored by Philipp Schafft's avatar Philipp Schafft 🦁

make <auth> in <mount type="default"> work if no <mount-name> is given.

svn path=/icecast/trunk/icecast/; revision=19251
parent 461a5375
......@@ -150,7 +150,8 @@ void auth_release (auth_t *authenticator)
xmlFree (authenticator->type);
thread_mutex_unlock (&authenticator->lock);
thread_mutex_destroy (&authenticator->lock);
free (authenticator->mount);
if (authenticator->mount)
free (authenticator->mount);
free (authenticator);
}
......
......@@ -720,8 +720,11 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node,
{
LOG_WARN("Default mount %s has mount-name set. This is not supported. Behavior may not be consistent.", mount->mountname);
}
if (mount->auth)
if (mount->auth && mount->mountname) {
mount->auth->mount = strdup ((char *)mount->mountname);
} else if (mount->auth && mount->mounttype == MOUNT_TYPE_DEFAULT ) {
mount->auth->mount = strdup ("(default mount)");
}
while(current) {
last = current;
current = current->next;
......
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