[Asterisk-code-review] res_ari_channels: Fixed endpoint 80 characters limit (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Tue Apr 21 15:49:15 CDT 2020
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14279 )
Change subject: res_ari_channels: Fixed endpoint 80 characters limit
......................................................................
Patch Set 2: Code-Review-1
(3 comments)
https://gerrit.asterisk.org/c/asterisk/+/14279/2/res/ari/resource_channels.c
File res/ari/resource_channels.c:
https://gerrit.asterisk.org/c/asterisk/+/14279/2/res/ari/resource_channels.c@1119
PS2, Line 1119: dialdevice = ast_strdupa(stuff);
Rather than allocating and copying the data. Just assign dialdevice with stuff.
dialdevice = stuff;
https://gerrit.asterisk.org/c/asterisk/+/14279/2/res/ari/resource_channels.c@1829
PS2, Line 1829: dialdevice = ast_strdupa(stuff);
same here
dialdevice = stuff;
https://gerrit.asterisk.org/c/asterisk/+/14279/2/res/ari/resource_channels.c@1832
PS2, Line 1832: originator = ast_channel_get_by_name(args->originator);
Missing a sanity check before this line just like in ari_channels_handle_originate_with_id(). We need to check if dialtech or dialdevice is not ast_strlen_zero() and return similar error as the args->endpoint check above. Error message something like: "Invalid endpoint specified".
I think the use of stuff later to save_dialstring() will crash if there is no '/' found in the args->endpoint. (stuff would be NULL)
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14279
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I91b5f6708a1200363f3267b847dd6a0915222c25
Gerrit-Change-Number: 14279
Gerrit-PatchSet: 2
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Tue, 21 Apr 2020 20:49:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200421/772a3eb3/attachment.html>
More information about the asterisk-code-review
mailing list