[Asterisk-code-review] app_sf: Add full tech-agnostic SF support (asterisk[master])

N A asteriskteam at digium.com
Thu Dec 16 09:58:14 CST 2021


Attention is currently required from: Kevin Harwell.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17652 )

Change subject: app_sf: Add full tech-agnostic SF support
......................................................................


Patch Set 4:

(5 comments)

File apps/app_sf.c:

https://gerrit.asterisk.org/c/asterisk/+/17652/comment/827b106a_a2e6de6f 
PS2, Line 223: 								if (!(dsp = ast_dsp_new())) {
             : 									ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
             : 									pbx_builtin_setvar_helper(chan, "RECEIVESFSTATUS", "ERROR");
             : 									ast_frfree(frame);
             : 									return -1;
             : 								}
             : 								ast_dsp_set_features(dsp, DSP_FEATURE_FREQ_DETECT);
             : 								ast_dsp_set_freqmode(dsp, freq, SF_MIN_DETECT, 16, 0);
> Did you mean to dupe the dsp new, set features, and frequmode code from above here? 'dsp' is set abo […]
Done


https://gerrit.asterisk.org/c/asterisk/+/17652/comment/07fd595b_7977cd89 
PS2, Line 278: 				}
> 'frame' is leaked here on each loop.
Done


File main/app.c:

https://gerrit.asterisk.org/c/asterisk/+/17652/comment/f9b78bd3_26420b16 
PS2, Line 870: 	freq = ast_malloc(32);
> Why 32? Either make this a description #define or add a comment about the size. […]
Done


File main/app.c:

https://gerrit.asterisk.org/c/asterisk/+/17652/comment/600ea961_cb1c6c69 
PS3, Line 877: 	freq = ast_alloca(SF_BUF_LEN); /* freed at the end */
> I'd remove the comment here ('freed ...'). […]
Done


https://gerrit.asterisk.org/c/asterisk/+/17652/comment/e4db84e4_e280c211 
PS3, Line 966: 	ast_free(freq);
> Now that you are allocating on the stack this can be removed. Surprised it didn't crash.
Done



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I7ec50752e9a661af639425e5d1e339f17411bcad
Gerrit-Change-Number: 17652
Gerrit-PatchSet: 4
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-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 16 Dec 2021 15:58:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211216/ff4a1d83/attachment.html>


More information about the asterisk-code-review mailing list