From: Naveen Albert Date: Thu, 25 Aug 2022 11:51:03 +0000 (+0000) Subject: res_tonedetect: Fix typos referring to wrong variables. X-Git-Tag: 19.7.0-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f712c0060e7d1bbeab7ca5d5ccd8f25110a2acf;p=thirdparty%2Fasterisk.git res_tonedetect: Fix typos referring to wrong variables. Fixes two typos that cause fax detection to not work. One refers to the wrong frame variable, and the other refers to the subclass.integer instead of the frametype as it should. ASTERISK-30192 #close Change-Id: I7b35fdb7bcf25a29a212eee37c20812c64ab3ef1 --- diff --git a/res/res_tonedetect.c b/res/res_tonedetect.c index ec5f784242..c02eeeb146 100644 --- a/res/res_tonedetect.c +++ b/res/res_tonedetect.c @@ -940,8 +940,8 @@ static int scan_exec(struct ast_channel *chan, const char *data) } else if (fax) { char result; frame2 = ast_dsp_process(chan, dsp2, frame2); - result = frame->subclass.integer; - if (result == AST_FRAME_DTMF) { + result = frame2->subclass.integer; + if (frame2->frametype == AST_FRAME_DTMF) { if (result == 'e') { pbx_builtin_setvar_helper(chan, "TONESCANSTATUS", "FAX"); match = 1;