]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_tonedetect: Fix typos referring to wrong variables.
authorNaveen Albert <asterisk@phreaknet.org>
Thu, 25 Aug 2022 11:51:03 +0000 (11:51 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Fri, 9 Sep 2022 18:31:25 +0000 (13:31 -0500)
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

res/res_tonedetect.c

index ec5f7842423d5cd971f23bcf33be92443bf453c5..c02eeeb146d24f82d00bb4d0a5b099c083c33fbe 100644 (file)
@@ -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;