aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_echo.c
diff options
context:
space:
mode:
authorpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-10 09:08:55 +0000
committerpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-10 09:08:55 +0000
commit4ca6376556393bd3b3d6372691c78054e82d1eeb (patch)
treeff4d27ea99229f3c84c6ec000dc0512166d3d9e7 /apps/app_echo.c
parent278ce354d34a0c8160aa91df01569393860fc419 (diff)
Much simpler than previous one ;-)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53880 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_echo.c')
-rw-r--r--apps/app_echo.c23
1 files changed, 8 insertions, 15 deletions
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);
}