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

Friendly Automation asteriskteam at digium.com
Fri Sep 9 13:31:30 CDT 2022


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19005 )

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, 18 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




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/+/19005
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: I7b35fdb7bcf25a29a212eee37c20812c64ab3ef1
Gerrit-Change-Number: 19005
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220909/33099a57/attachment.html>


More information about the asterisk-code-review mailing list