1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

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

svn path=/icecast/trunk/icecast/; revision=19251
This commit is contained in:
Philipp Schafft 2014-10-26 14:03:57 +00:00
parent 461a537561
commit cf419cc1df
2 changed files with 6 additions and 2 deletions

View File

@ -150,7 +150,8 @@ void auth_release (auth_t *authenticator)
xmlFree (authenticator->type); xmlFree (authenticator->type);
thread_mutex_unlock (&authenticator->lock); thread_mutex_unlock (&authenticator->lock);
thread_mutex_destroy (&authenticator->lock); thread_mutex_destroy (&authenticator->lock);
free (authenticator->mount); if (authenticator->mount)
free (authenticator->mount);
free (authenticator); free (authenticator);
} }

View File

@ -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); 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); mount->auth->mount = strdup ((char *)mount->mountname);
} else if (mount->auth && mount->mounttype == MOUNT_TYPE_DEFAULT ) {
mount->auth->mount = strdup ("(default mount)");
}
while(current) { while(current) {
last = current; last = current;
current = current->next; current = current->next;