Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
100
Issues
100
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
6f6499a1
Commit
6f6499a1
authored
Jul 06, 2018
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Formating
parent
73f00d59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
xslt.c
src/xslt.c
+12
-13
No files found.
src/xslt.c
View file @
6f6499a1
...
...
@@ -152,23 +152,20 @@ static xsltStylesheetPtr xslt_get_stylesheet(const char *fn) {
int
empty
=
-
1
;
struct
stat
file
;
if
(
stat
(
fn
,
&
file
)
)
{
if
(
stat
(
fn
,
&
file
)
!=
0
)
{
ICECAST_LOG_WARN
(
"Error checking for stylesheet file
\"
%s
\"
: %s"
,
fn
,
strerror
(
errno
));
return
NULL
;
}
for
(
i
=
0
;
i
<
CACHESIZE
;
i
++
)
{
if
(
cache
[
i
].
filename
)
{
for
(
i
=
0
;
i
<
CACHESIZE
;
i
++
)
{
if
(
cache
[
i
].
filename
)
{
#ifdef _WIN32
if
(
!
stricmp
(
fn
,
cache
[
i
].
filename
))
if
(
!
stricmp
(
fn
,
cache
[
i
].
filename
))
{
#else
if
(
!
strcmp
(
fn
,
cache
[
i
].
filename
))
if
(
!
strcmp
(
fn
,
cache
[
i
].
filename
))
{
#endif
{
if
(
file
.
st_mtime
>
cache
[
i
].
last_modified
)
{
if
(
file
.
st_mtime
>
cache
[
i
].
last_modified
)
{
xsltFreeStylesheet
(
cache
[
i
].
stylesheet
);
cache
[
i
].
last_modified
=
file
.
st_mtime
;
...
...
@@ -178,20 +175,22 @@ static xsltStylesheetPtr xslt_get_stylesheet(const char *fn) {
ICECAST_LOG_DEBUG
(
"Using cached sheet %i"
,
i
);
return
cache
[
i
].
stylesheet
;
}
}
else
}
else
{
empty
=
i
;
}
}
if
(
empty
>=
0
)
if
(
empty
>=
0
)
{
i
=
empty
;
else
}
else
{
i
=
evict_cache_entry
();
}
cache
[
i
].
last_modified
=
file
.
st_mtime
;
cache
[
i
].
filename
=
strdup
(
fn
);
cache
[
i
].
stylesheet
=
xsltParseStylesheetFile
(
XMLSTR
(
fn
));
cache
[
i
].
cache_age
=
time
(
NULL
);
return
cache
[
i
].
stylesheet
;
}
...
...
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