diff options
author | Joshua Colp <jcolp@digium.com> | 2013-12-03 16:39:13 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-12-03 16:39:13 +0000 |
commit | 8b24b0d20647697c9ee899dea85871465c3032cb (patch) | |
tree | 17a76431c3a6d625743696ba20251989ab21558d /main | |
parent | 879bd7aad916abc32b632840734a5d0b431ab981 (diff) |
media_index: Make media indexing tolerable of bad symlinks.
Media indexing will now skip over files and directories that stat
will not return information about. This can occur under normal
conditions when a symbolic link points to a location that no longer
exists.
........
Merged revisions 403312 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/media_index.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/media_index.c b/main/media_index.c index 278b37c26..a643c237f 100644 --- a/main/media_index.c +++ b/main/media_index.c @@ -551,9 +551,8 @@ static int media_index_update(struct ast_media_index *index, ast_str_set(&statfile, 0, "%s/%s", ast_str_buffer(index_dir), dent->d_name); if (stat(ast_str_buffer(statfile), &st) < 0) { - ast_log(LOG_ERROR, "Failed to stat %s: %s\n", ast_str_buffer(statfile), strerror(errno)); - res = -1; - break; + ast_log(LOG_WARNING, "Failed to stat %s: %s\n", ast_str_buffer(statfile), strerror(errno)); + continue; } if (S_ISDIR(st.st_mode)) { |