From dafb5f401b8cec806f83d850e0022d8d4aaa5eed Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 27 Sep 2011 17:10:48 +0000 Subject: [PATCH] xpp: fix FXS D DTMF detection (not zero) * 'D' DTMF digits were accidentally discarded with the notice message: "Bad DTMF value 0. Ignored". * No need for an odd 1-based translation table anymore - it's 0-based. Signed-off-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10209 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/card_fxs.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index d296164..e1e952e 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -1300,7 +1300,8 @@ static void process_digital_inputs(xpd_t *xpd, const reg_cmd_t *info) #endif static const char dtmf_digits[] = { - '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#', 'A', 'B', 'C', 'D' + 'D', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#', + 'A', 'B', 'C' }; /* @@ -1322,12 +1323,6 @@ static void process_dtmf(xpd_t *xpd, uint portnum, byte val) return; priv = xpd->priv; val &= 0xF; - if(val <= 0) { - if(key_down) - XPD_NOTICE(xpd, "Bad DTMF value %d. Ignored\n", val); - return; - } - val--; digit = dtmf_digits[val]; want_mute = IS_SET(priv->want_dtmf_mute, portnum); want_event = IS_SET(priv->want_dtmf_events, portnum);