Commit 5252a140 authored by Michael Smith's avatar Michael Smith

Fix various minor bugs in per-mountpoint configs.

svn path=/trunk/icecast/; revision=4385
parent a1693802
......@@ -361,6 +361,8 @@ static void _parse_mount(xmlDocPtr doc, xmlNodePtr node)
else
_configuration.mounts = mount;
mount->max_listeners = -1;
do {
if (node == NULL) break;
if (xmlIsBlankNode(node)) continue;
......
......@@ -434,8 +434,10 @@ static int _check_source_pass(http_parser_t *parser, char *mount)
mount_proxy *mountinfo = config_get_config()->mounts;
while(mountinfo) {
if(!strcmp(mountinfo->mountname, mount)) {
pass = mountinfo->password;
user = mountinfo->username;
if(mountinfo->password)
pass = mountinfo->password;
if(mountinfo->username)
user = mountinfo->username;
break;
}
mountinfo = mountinfo->next;
......@@ -803,7 +805,6 @@ static void _handle_get_request(connection_t *con,
return;
}
global.clients++;
source->listeners++;
global_unlock();
client->format_data = source->format->create_client_data(
......
......@@ -74,6 +74,7 @@ source_t *source_create(client_t *client, connection_t *con,
src->running = 1;
src->num_yp_directories = 0;
src->listeners = 0;
src->max_listeners = -1;
src->send_return = 0;
src->dumpfilename = NULL;
src->dumpfile = NULL;
......
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