[Asterisk-code-review] ari/bridge: Add mute, dtmf suppression controls (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Mon Oct 9 16:59:26 CDT 2017


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/6675 )

Change subject: ari/bridge: Add mute, dtmf suppression controls
......................................................................


Patch Set 1: Code-Review-1

(5 comments)

https://gerrit.asterisk.org/#/c/6675/1/res/ari/resource_bridges.c
File res/ari/resource_bridges.c:

https://gerrit.asterisk.org/#/c/6675/1/res/ari/resource_bridges.c@202
PS1, Line 202: 
The extra whitespace can be deleted.


https://gerrit.asterisk.org/#/c/6675/1/res/ari/resource_bridges.c@224
PS1, Line 224:    /* Apply bridge features to each of the channel controls */
             :    for (i = 0; i < list->count; ++i) {
             :       if(!stasis_app_control_bridge_features_init(list->controls[i])) {
             :          stasis_app_control_absorb_dtmf_in_bridge(list->controls[i], args->absorb_dtmf);
             :          stasis_app_control_mute_in_bridge(list->controls[i], args->mute);
             :       }
             :    }
Probably not a huge deal, but can this code be moved up into previous "for loop" instead of iterating over the list a second time?


https://gerrit.asterisk.org/#/c/6675/1/res/stasis/control.c
File res/stasis/control.c:

https://gerrit.asterisk.org/#/c/6675/1/res/stasis/control.c@107
PS1, Line 107: 
The destructor needs to call to ast_bridge_features_destroy.


https://gerrit.asterisk.org/#/c/6675/1/res/stasis/control.c@1178
PS1, Line 1178:    /* Pull bridge features from the control */
              :    features = control->bridge_features;
              :    control->bridge_features = NULL;
Probably better to move this below when the control is locked.


https://gerrit.asterisk.org/#/c/6675/1/res/stasis/control.c@1201
PS1, Line 1201: 	if (res != 0) {
              : 		ast_log(LOG_ERROR, "Error setting after-bridge callback\n");
              : 		return -1;
              : 	}
This off nominal path leaks features. Either you'll need a call to ast_bridge_features_destroy here or move the setting of features to after this.



-- 
To view, visit https://gerrit.asterisk.org/6675
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id4002adfb65c9a8027ee9e1a5f477e0f01cf9d61
Gerrit-Change-Number: 6675
Gerrit-PatchSet: 1
Gerrit-Owner: Seán C. McCord <ulexus at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Mon, 09 Oct 2017 21:59:26 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171009/3b0ff778/attachment.html>


More information about the asterisk-code-review mailing list