[xiph-commits] r8776 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Sat Jan 22 06:31:44 PST 2005
Author: karl
Date: 2005-01-22 06:31:40 -0800 (Sat, 22 Jan 2005)
New Revision: 8776
Modified:
icecast/branches/kh/icecast/src/admin.c
icecast/branches/kh/icecast/src/format_ogg.c
icecast/branches/kh/icecast/src/format_vorbis.c
icecast/branches/kh/icecast/src/xslt.c
Log:
small cleanups
Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c 2005-01-21 15:36:39 UTC (rev 8775)
+++ icecast/branches/kh/icecast/src/admin.c 2005-01-22 14:31:40 UTC (rev 8776)
@@ -722,7 +722,8 @@
xmlNewChild(listenernode, NULL, "UserAgent", "Unknown");
}
memset(buf, '\000', sizeof(buf));
- snprintf(buf, sizeof(buf)-1, "%ld", now - current->con->con_time);
+ snprintf (buf, sizeof(buf), "%lu",
+ (unsigned long)(now - current->con->con_time));
xmlNewChild(listenernode, NULL, "Connected", buf);
memset(buf, '\000', sizeof(buf));
snprintf(buf, sizeof(buf)-1, "%lu", current->con->id);
@@ -1069,6 +1070,8 @@
{
source_t *source = (source_t *)node->key;
node = avl_get_next(node);
+ if (source->running == 0 && source->on_demand == 0)
+ continue;
if (source->hidden)
continue;
remaining -= ret;
Modified: icecast/branches/kh/icecast/src/format_ogg.c
===================================================================
--- icecast/branches/kh/icecast/src/format_ogg.c 2005-01-21 15:36:39 UTC (rev 8775)
+++ icecast/branches/kh/icecast/src/format_ogg.c 2005-01-22 14:31:40 UTC (rev 8776)
@@ -246,7 +246,7 @@
char *title = ogg_info->title;
char *artist = ogg_info->artist;
char *metadata = NULL;
- unsigned int len = 0;
+ unsigned int len = 1; /* space for the nul byte at least */
ogg_codec_t *codec;
char codec_names [100] = "";
Modified: icecast/branches/kh/icecast/src/format_vorbis.c
===================================================================
--- icecast/branches/kh/icecast/src/format_vorbis.c 2005-01-21 15:36:39 UTC (rev 8775)
+++ icecast/branches/kh/icecast/src/format_vorbis.c 2005-01-22 14:31:40 UTC (rev 8776)
@@ -200,7 +200,7 @@
format_ogg_free_headers (ogg_info);
source_vorbis->get_buffer_page = NULL;
- source_vorbis->process_packet = process_vorbis_headers;
+ source_vorbis->process_packet = NULL;
if (source_vorbis->initial_audio_packet == 0)
source_vorbis->prev_window = 0;
Modified: icecast/branches/kh/icecast/src/xslt.c
===================================================================
--- icecast/branches/kh/icecast/src/xslt.c 2005-01-21 15:36:39 UTC (rev 8775)
+++ icecast/branches/kh/icecast/src/xslt.c 2005-01-22 14:31:40 UTC (rev 8776)
@@ -157,12 +157,12 @@
thread_mutex_lock(&xsltlock);
cur = xslt_get_stylesheet(xslfilename);
- thread_mutex_unlock(&xsltlock);
if (cur == NULL)
{
const char error[] = "Could not parse XSLT file";
+ thread_mutex_unlock(&xsltlock);
client_send_bytes (client, error, sizeof (error)-1);
return;
}
@@ -170,6 +170,7 @@
res = xsltApplyStylesheet(cur, doc, NULL);
xsltSaveResultToString (&string, &len, res, cur);
+ thread_mutex_unlock(&xsltlock);
if (string)
{
client_send_bytes (client, string, len);
More information about the commits
mailing list