mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Merge "media_cache: Mark cache entry stale if cache file is removed"
This commit is contained in:
@@ -224,7 +224,8 @@ 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);
|
bucket_file = ao2_find(media_cache, uri, OBJ_SEARCH_KEY | OBJ_NOLOCK);
|
||||||
if (bucket_file) {
|
if (bucket_file) {
|
||||||
if (!ast_bucket_file_is_stale(bucket_file)) {
|
if (!ast_bucket_file_is_stale(bucket_file)
|
||||||
|
&& !access(bucket_file->path, R_OK)) {
|
||||||
ast_copy_string(file_path, bucket_file->path, len);
|
ast_copy_string(file_path, bucket_file->path, len);
|
||||||
if ((ext = strrchr(file_path, '.'))) {
|
if ((ext = strrchr(file_path, '.'))) {
|
||||||
*ext = '\0';
|
*ext = '\0';
|
||||||
|
Reference in New Issue
Block a user