Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
3ffe5f4e
Commit
3ffe5f4e
authored
Jul 06, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update: Adding more debugging to XSLT cache
parent
e9140588
Pipeline
#244
failed with stage
in 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/xslt.c
src/xslt.c
+5
-0
No files found.
src/xslt.c
View file @
3ffe5f4e
...
...
@@ -152,6 +152,8 @@ static xsltStylesheetPtr xslt_get_stylesheet(const char *fn) {
int
empty
=
-
1
;
struct
stat
file
;
ICECAST_LOG_DEBUG
(
"Looking up stylesheet file
\"
%s
\"
."
,
fn
);
if
(
stat
(
fn
,
&
file
)
!=
0
)
{
ICECAST_LOG_WARN
(
"Error checking for stylesheet file
\"
%s
\"
: %s"
,
fn
,
strerror
(
errno
));
...
...
@@ -166,6 +168,7 @@ static xsltStylesheetPtr xslt_get_stylesheet(const char *fn) {
if
(
!
strcmp
(
fn
,
cache
[
i
].
filename
))
{
#endif
if
(
file
.
st_mtime
>
cache
[
i
].
last_modified
)
{
ICECAST_LOG_DEBUG
(
"Source file newer than cached copy. Reloading slot %i"
,
i
);
xsltFreeStylesheet
(
cache
[
i
].
stylesheet
);
cache
[
i
].
last_modified
=
file
.
st_mtime
;
...
...
@@ -182,8 +185,10 @@ static xsltStylesheetPtr xslt_get_stylesheet(const char *fn) {
if
(
empty
>=
0
)
{
i
=
empty
;
ICECAST_LOG_DEBUG
(
"Using empty slot %i"
,
i
);
}
else
{
i
=
evict_cache_entry
();
ICECAST_LOG_DEBUG
(
"Using evicted slot %i"
,
i
);
}
cache
[
i
].
last_modified
=
file
.
st_mtime
;
...
...
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