Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
35cfd2c0
Commit
35cfd2c0
authored
8 years ago
by
Sean Bright
Browse files
Options
Downloads
Patches
Plain Diff
media_cache: Prefer ast_file_is_readable() over access()
Change-Id: Icc0dc6e61b2e68d5cdcb74b016b2726a388c7def
parent
ff056974
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/media_cache.c
+1
-1
1 addition, 1 deletion
main/media_cache.c
with
1 addition
and
1 deletion
main/media_cache.c
+
1
−
1
View file @
35cfd2c0
...
...
@@ -225,7 +225,7 @@ int ast_media_cache_retrieve(const char *uri, const char *preferred_file_name,
bucket_file
=
ao2_find
(
media_cache
,
uri
,
OBJ_SEARCH_KEY
|
OBJ_NOLOCK
);
if
(
bucket_file
)
{
if
(
!
ast_bucket_file_is_stale
(
bucket_file
)
&&
!
access
(
bucket_file
->
path
,
R_OK
))
{
&&
ast_file_is_readable
(
bucket_file
->
path
))
{
ast_copy_string
(
file_path
,
bucket_file
->
path
,
len
);
if
((
ext
=
strrchr
(
file_path
,
'.'
)))
{
*
ext
=
'\0'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment