[Asterisk-code-review] res_tonedetect: Fix typos referring to wrong variables. (asterisk[master])

N A asteriskteam at digium.com
Thu Aug 25 06:56:54 CDT 2022


N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18988 )


Change subject: res_tonedetect: Fix typos referring to wrong variables.
......................................................................

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
---
M res/res_tonedetect.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/18988/1

diff --git a/res/res_tonedetect.c b/res/res_tonedetect.c
index ec5f784..c02eeeb 100644
--- a/res/res_tonedetect.c
+++ b/res/res_tonedetect.c
@@ -940,8 +940,8 @@
 				} 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;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18988
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I7b35fdb7bcf25a29a212eee37c20812c64ab3ef1
Gerrit-Change-Number: 18988
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220825/e1a35d89/attachment.html>


More information about the asterisk-code-review mailing list