summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2015-05-20 18:05:20 -0600
committerGeorge Joseph <george.joseph@fairview5.com>2015-05-20 19:10:49 -0500
commit31f0d78d7b73dfe0e5a59a115bc17aae0c5416e7 (patch)
tree87cb3d61dc7d8d881f0ef1c97a699c27278c22f2 /apps
parent3f5a86037dc3b02933c8518e12827dba4852c155 (diff)
app_playback: Suppress warnings on playback if channel hung up
If a channel hangs up while an audio file is playing, there's no need to clutter up the logs with a warning so suppress it if ast_check_hangup returns true. Also, change warning to debug/2 in file.c if writing a frame fails. Same reasoning. Change-Id: I2e66191af3c5b6e951c98e8f1c3fe3cf2cf7ed89 Reported-by: George Joseph <george.joseph@fairview5.com> Tested-by: George Joseph <george.joseph@fairview5.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/app_playback.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_playback.c b/apps/app_playback.c
index feb7b633d..2875ec2b4 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -490,7 +490,9 @@ static int playback_exec(struct ast_channel *chan, const char *data)
ast_stopstream(chan);
}
if (res) {
- ast_log(LOG_WARNING, "Playback failed on %s for %s\n", ast_channel_name(chan), (char *)data);
+ if (!ast_check_hangup(chan)) {
+ ast_log(LOG_WARNING, "Playback failed on %s for %s\n", ast_channel_name(chan), (char *)data);
+ }
res = 0;
mres = 1;
}