Commit 2e21e899 authored by Michael Smith's avatar Michael Smith

Minor incompatible change to relaying, to match actual protocol.

svn path=/trunk/icecast/; revision=4169
parent b8e157d7
......@@ -577,6 +577,11 @@ static void _handle_get_request(connection_t *con,
INFO0("Client attempted to fetch allstreams.txt with bad password");
client_send_401(client);
} else {
client->respcode = 200;
bytes = sock_write(client->con->sock,
"HTTP/1.0 200 OK\r\n\r\n");
if(bytes > 0) client->con->sent_bytes = bytes;
avl_node *node;
source_t *s;
avl_tree_rlock(global.source_tree);
......
......@@ -104,7 +104,11 @@ static void *_slave_thread(void *arg) {
sock_write(mastersock, "GET /allstreams.txt HTTP/1.0\r\nAuthorization: Basic %s\r\n\r\n", data);
free(data);
while (sock_read_line(mastersock, buf, sizeof(buf))) {
buf[strlen(buf)] = 0;
if(!strlen(buf))
break;
}
while (sock_read_line(mastersock, buf, sizeof(buf))) {
avl_tree_rlock(global.source_tree);
if (!source_find_mount(buf)) {
avl_tree_unlock(global.source_tree);
......
......@@ -111,6 +111,7 @@ static xsltStylesheetPtr xslt_get_stylesheet(char *fn) {
cache[i].stylesheet = xsltParseStylesheetFile(fn);
cache[i].cache_age = time(NULL);
}
DEBUG1("Using cached sheet %i", i);
return cache[i].stylesheet;
}
}
......
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