From: Mark Spencer Date: Wed, 7 Apr 2004 20:14:19 +0000 (+0000) Subject: Fix SendDTMF which was clearly not even tested before it was last committed. X-Git-Tag: 1.0.0-rc1~765 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=50edc0800175df6ed7cb0e6df513d5e90693a0fb;p=thirdparty%2Fasterisk.git Fix SendDTMF which was clearly not even tested before it was last committed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2657 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c index c2ca2c2f30..2e85b01d35 100755 --- a/apps/app_senddtmf.c +++ b/apps/app_senddtmf.c @@ -55,18 +55,17 @@ static int senddtmf_exec(struct ast_channel *chan, void *data) f.frametype = AST_FRAME_DTMF; f.subclass = digits[x]; f.src = "app_senddtmf"; - res = ast_write(chan, &f); - if (strchr("0123456789*#abcd",digits[x])==NULL) { - ast_log(LOG_WARNING, "Illegal DTMF character in string. (0-9*#abcd allowed)\n"); - } else { - res = ast_write(chan, &f); - if (res) - break; - /* Wait 250ms */ - res = ast_safe_sleep(chan, 250); - if (res) - break; - } + if (strchr("0123456789*#abcd",digits[x])==NULL) { + ast_log(LOG_WARNING, "Illegal DTMF character in string. (0-9*#abcd allowed)\n"); + } else { + res = ast_write(chan, &f); + if (res) + break; + /* Wait 250ms */ + res = ast_safe_sleep(chan, 250); + if (res) + break; + } } if (!res) if (option_verbose > 2)