[xiph-commits] r9463 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Fri Jun 17 18:43:59 PDT 2005
Author: karl
Date: 2005-06-17 18:43:56 -0700 (Fri, 17 Jun 2005)
New Revision: 9463
Modified:
icecast/branches/kh/icecast/src/admin.c
Log:
missed relay list for slaves when sending response via file server thread.
Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c 2005-06-17 22:55:59 UTC (rev 9462)
+++ icecast/branches/kh/icecast/src/admin.c 2005-06-18 01:43:56 UTC (rev 9463)
@@ -1144,14 +1144,18 @@
avl_tree_rlock (global.source_tree);
if (response == PLAINTEXT)
{
- char buffer [4096], *buf = buffer;
- unsigned int remaining = sizeof (buffer);
- int ret = snprintf (buffer, remaining,
+ char *buf;
+ unsigned int remaining = 4096;
+ int ret;
+ ice_config_t *config = config_get_config ();
+ mount_proxy *mountinfo = config->mounts;
+
+ client->refbuf = refbuf_new (remaining);
+ buf = client->refbuf->data;
+ ret = snprintf (buf, remaining,
"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n");
- ice_config_t *config = config_get_config ();
- mount_proxy *mountinfo = config->mounts;
- while (mountinfo)
+ while (mountinfo && ret > 0 && ret < remaining)
{
mount_proxy *current = mountinfo;
source_t *source;
@@ -1182,8 +1186,8 @@
remaining -= ret;
buf += ret;
}
- client_send_bytes (client, buffer, sizeof (buffer)-remaining);
- client_destroy(client);
+ client->refbuf->len = 4096 - remaining;
+ fserve_add_client (client, NULL);
}
else
{
@@ -1194,8 +1198,6 @@
LISTMOUNTS_TRANSFORMED_REQUEST);
xmlFreeDoc(doc);
}
-
- return;
}
static void command_updatemetadata(client_t *client, source_t *source,
More information about the commits
mailing list