From 31f0d78d7b73dfe0e5a59a115bc17aae0c5416e7 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Wed, 20 May 2015 18:05:20 -0600 Subject: 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 Tested-by: George Joseph --- main/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/file.c') diff --git a/main/file.c b/main/file.c index acd2cc6bc..bfad6e025 100644 --- a/main/file.c +++ b/main/file.c @@ -897,7 +897,7 @@ static enum fsread_res ast_readaudio_callback(struct ast_filestream *s) if (!fr /* stream complete */ || ast_write(s->owner, fr) /* error writing */) { if (fr) { - ast_log(LOG_WARNING, "Failed to write frame\n"); + ast_debug(2, "Failed to write frame\n"); ast_frfree(fr); } goto return_failure; @@ -954,7 +954,7 @@ static enum fsread_res ast_readvideo_callback(struct ast_filestream *s) if (!fr /* stream complete */ || ast_write(s->owner, fr) /* error writing */) { if (fr) { - ast_log(LOG_WARNING, "Failed to write frame\n"); + ast_debug(2, "Failed to write frame\n"); ast_frfree(fr); } ast_channel_vstreamid_set(s->owner, -1); -- cgit v1.2.3