[xiph-commits] r8723 - icecast/trunk/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Tue Jan 11 08:36:35 PST 2005
Author: karl
Date: 2005-01-11 08:36:34 -0800 (Tue, 11 Jan 2005)
New Revision: 8723
Modified:
icecast/trunk/icecast/src/xslt.c
Log:
only unlock when we have finished with the stylesheet, potential race otherwise
Modified: icecast/trunk/icecast/src/xslt.c
===================================================================
--- icecast/trunk/icecast/src/xslt.c 2005-01-11 11:27:06 UTC (rev 8722)
+++ icecast/trunk/icecast/src/xslt.c 2005-01-11 16:36:34 UTC (rev 8723)
@@ -161,9 +161,9 @@
thread_mutex_lock(&xsltlock);
cur = xslt_get_stylesheet(xslfilename);
- thread_mutex_unlock(&xsltlock);
if (cur == NULL) {
+ thread_mutex_unlock(&xsltlock);
bytes = sock_write_string(client->con->sock,
(char *)"Could not parse XSLT file");
if(bytes > 0) client->con->sent_bytes += bytes;
@@ -176,6 +176,7 @@
outputBuffer = xmlAllocOutputBuffer(NULL);
count = xsltSaveResultTo(outputBuffer, res, cur);
+ thread_mutex_unlock(&xsltlock);
/* Add null byte to end. */
bytes = xmlOutputBufferWrite(outputBuffer, 1, "");
More information about the commits
mailing list