[xiph-commits] r9459 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Thu Jun 16 06:42:32 PDT 2005
Author: karl
Date: 2005-06-16 06:42:27 -0700 (Thu, 16 Jun 2005)
New Revision: 9459
Modified:
icecast/branches/kh/icecast/src/admin.c
icecast/branches/kh/icecast/src/stats.h
icecast/branches/kh/icecast/src/xslt.c
Log:
fix fd leak on streamlist.txt. A deletion too far when making admin responses
be handled by the file serving thread
Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c 2005-06-16 01:58:53 UTC (rev 9458)
+++ icecast/branches/kh/icecast/src/admin.c 2005-06-16 13:42:27 UTC (rev 9459)
@@ -301,6 +301,7 @@
client->refbuf = refbuf_new (buf_len);
snprintf (client->refbuf->data, buf_len, "%s%d\r\n\r\n%s", http, len, buff);
xmlFree(buff);
+ client->respcode = 200;
fserve_add_client (client, NULL);
}
if (response == TRANSFORMED)
@@ -321,6 +322,8 @@
free(fullpath_xslt_template);
}
}
+
+
void admin_handle_request(client_t *client, char *uri)
{
char *mount, *command_string;
@@ -1179,7 +1182,8 @@
remaining -= ret;
buf += ret;
}
- sock_write_bytes (client->con->sock, buffer, sizeof (buffer)-remaining);
+ client_send_bytes (client, buffer, sizeof (buffer)-remaining);
+ client_destroy(client);
}
else
{
Modified: icecast/branches/kh/icecast/src/stats.h
===================================================================
--- icecast/branches/kh/icecast/src/stats.h 2005-06-16 01:58:53 UTC (rev 9458)
+++ icecast/branches/kh/icecast/src/stats.h 2005-06-16 13:42:27 UTC (rev 9459)
@@ -86,7 +86,7 @@
void *stats_connection(void *arg);
void *stats_callback(void *arg);
-void stats_transform_xslt(client_t *client, const char *xslpath);
+void stats_transform_xslt(client_t *client, const char *uri);
void stats_sendxml(client_t *client);
void stats_get_xml(xmlDocPtr *doc, int show_hidden);
char *stats_get_value(char *source, char *name);
Modified: icecast/branches/kh/icecast/src/xslt.c
===================================================================
--- icecast/branches/kh/icecast/src/xslt.c 2005-06-16 01:58:53 UTC (rev 9458)
+++ icecast/branches/kh/icecast/src/xslt.c 2005-06-16 13:42:27 UTC (rev 9459)
@@ -176,7 +176,7 @@
if (string)
{
const char *http = "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nContent-Length: ";
- unsigned buf_len = len + strlen (http) + 20;
+ unsigned buf_len = strlen (http) + 20 + len;
client->respcode = 200;
client->refbuf = refbuf_new (buf_len);
More information about the commits
mailing list