From: Sean Bright Date: Sat, 23 Sep 2017 17:32:26 +0000 (-0400) Subject: app_stream_echo: Don't echo declined streams X-Git-Tag: 16.0.0-rc1~795^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0fad11f21c309b44ada3572f593b6dd6588baa28;p=thirdparty%2Fasterisk.git app_stream_echo: Don't echo declined streams Discovered while experimenting with Cyber Mega Phone 2K Ultimate Dynamic Edition after accepting the audio request but declining the video one. Change-Id: Iaa86d41fccfbc1b559a30ccf740d78a3b5f8a98c --- diff --git a/apps/app_stream_echo.c b/apps/app_stream_echo.c index 9695dcc872..717ed1c886 100644 --- a/apps/app_stream_echo.c +++ b/apps/app_stream_echo.c @@ -249,6 +249,11 @@ static struct ast_stream_topology *stream_echo_topology_alloc( continue; } + if (ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) { + /* Don't copy removed/declined streams */ + continue; + } + do { stream = ast_stream_clone(stream, NULL);