Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
df919a96
Commit
df919a96
authored
Jan 11, 2005
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only unlock when we have finished with the stylesheet, potential race otherwise
svn path=/icecast/trunk/icecast/; revision=8723
parent
6c4c02d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/xslt.c
src/xslt.c
+2
-1
No files found.
src/xslt.c
View file @
df919a96
...
@@ -161,9 +161,9 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
...
@@ -161,9 +161,9 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
thread_mutex_lock
(
&
xsltlock
);
thread_mutex_lock
(
&
xsltlock
);
cur
=
xslt_get_stylesheet
(
xslfilename
);
cur
=
xslt_get_stylesheet
(
xslfilename
);
thread_mutex_unlock
(
&
xsltlock
);
if
(
cur
==
NULL
)
{
if
(
cur
==
NULL
)
{
thread_mutex_unlock
(
&
xsltlock
);
bytes
=
sock_write_string
(
client
->
con
->
sock
,
bytes
=
sock_write_string
(
client
->
con
->
sock
,
(
char
*
)
"Could not parse XSLT file"
);
(
char
*
)
"Could not parse XSLT file"
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
+=
bytes
;
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
+=
bytes
;
...
@@ -176,6 +176,7 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
...
@@ -176,6 +176,7 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
outputBuffer
=
xmlAllocOutputBuffer
(
NULL
);
outputBuffer
=
xmlAllocOutputBuffer
(
NULL
);
count
=
xsltSaveResultTo
(
outputBuffer
,
res
,
cur
);
count
=
xsltSaveResultTo
(
outputBuffer
,
res
,
cur
);
thread_mutex_unlock
(
&
xsltlock
);
/* Add null byte to end. */
/* Add null byte to end. */
bytes
=
xmlOutputBufferWrite
(
outputBuffer
,
1
,
""
);
bytes
=
xmlOutputBufferWrite
(
outputBuffer
,
1
,
""
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment