Coverity Report: Fix issues for error type CHECKED_RETURN for core

(issue ASTERISK-19658)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1905/
........

Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2012-05-10 18:35:14 +00:00
parent 3430da58e9
commit 8227f70cd7
14 changed files with 89 additions and 26 deletions

View File

@@ -4946,7 +4946,9 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
res2 |= ast_safe_sleep(peer, qe->parent->memberdelay * 1000);
}
if (!res2 && announce) {
play_file(peer, announce);
if (play_file(peer, announce) < 0) {
ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", announce, ast_channel_name(peer));
}
}
if (!res2 && qe->parent->reportholdtime) {
if (!play_file(peer, qe->parent->sound_reporthold)) {
@@ -4957,11 +4959,15 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
holdtimesecs = abs((now - qe->start) % 60);
if (holdtime > 0) {
ast_say_number(peer, holdtime, AST_DIGIT_ANY, ast_channel_language(peer), NULL);
play_file(peer, qe->parent->sound_minutes);
if (play_file(peer, qe->parent->sound_minutes) < 0) {
ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", qe->parent->sound_minutes, ast_channel_name(peer));
}
}
if (holdtimesecs > 1) {
ast_say_number(peer, holdtimesecs, AST_DIGIT_ANY, ast_channel_language(peer), NULL);
play_file(peer, qe->parent->sound_seconds);
if (play_file(peer, qe->parent->sound_seconds) < 0) {
ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", qe->parent->sound_seconds, ast_channel_name(peer));
}
}
}
}