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

Minor incompatible change to relaying, to match actual protocol.

svn path=/trunk/icecast/; revision=4169
This commit is contained in:
Michael Smith 2002-12-29 09:21:32 +00:00
parent b8e157d7d1
commit 2e21e899c9
3 changed files with 11 additions and 1 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;
}
}