From d616dd92d93c2dd2ec5359fd7ce025feafcbf166 Mon Sep 17 00:00:00 2001 From: pcadach Date: Sat, 10 Feb 2007 09:22:15 +0000 Subject: Merged revisions 53880 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r53880 | pcadach | 2007-02-10 01:08:55 -0800 (Сбт, 10 Фев 2007) | 1 line Much simpler than previous one ;-) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53884 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_echo.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'apps/app_echo.c') diff --git a/apps/app_echo.c b/apps/app_echo.c index 73ca2d181..14f7c6d65 100644 --- a/apps/app_echo.c +++ b/apps/app_echo.c @@ -69,21 +69,14 @@ static int echo_exec(struct ast_channel *chan, void *data) break; f->delivery.tv_sec = 0; f->delivery.tv_usec = 0; - switch (f->frametype) { - case AST_FRAME_DTMF: - if (f->subclass == '#') { - res = 0; - if (ast_write(chan, f)) - res = -1; - ast_frfree(f); - goto end; - } - /* fall through */ - default: - if (ast_write(chan, f)) { - ast_frfree(f); - goto end; - } + if (ast_write(chan, f)) { + ast_frfree(f); + goto end; + } + if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) { + res = 0; + ast_frfree(f); + goto end; } ast_frfree(f); } -- cgit v1.2.3