mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Don't try to play sound files that do not exist.
(closes issue ASTERISK-19188) Reported by: slesru ........ Merged revisions 354938 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -614,7 +614,7 @@ static int announce_user_count(struct conference_bridge *conference_bridge, stru
|
||||
"")) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
} else if (ast_fileexists(there_are, NULL, NULL) && ast_fileexists(other_in_party, NULL, NULL)) {
|
||||
play_sound_file(conference_bridge, there_are);
|
||||
play_sound_number(conference_bridge, conference_bridge->users - 1);
|
||||
play_sound_file(conference_bridge, other_in_party);
|
||||
@@ -1147,6 +1147,12 @@ static int play_sound_helper(struct conference_bridge *conference_bridge, const
|
||||
{
|
||||
struct ast_channel *underlying_channel;
|
||||
|
||||
/* Do not waste resources trying to play files that do not exist */
|
||||
if (!ast_fileexists(filename, NULL, NULL)) {
|
||||
ast_log(LOG_WARNING, "File %s does not exist in any format\n", filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ast_mutex_lock(&conference_bridge->playback_lock);
|
||||
if (!(conference_bridge->playback_chan)) {
|
||||
if (alloc_playback_chan(conference_bridge)) {
|
||||
|
Reference in New Issue
Block a user