[Asterisk-code-review] res_stir_shaken: Added dialplan function and API call. (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Mon May 11 17:35:57 CDT 2020
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14339 )
Change subject: res_stir_shaken: Added dialplan function and API call.
......................................................................
Patch Set 6: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/c/asterisk/+/14339/6/res/res_stir_shaken.c
File res/res_stir_shaken.c:
https://gerrit.asterisk.org/c/asterisk/+/14339/6/res/res_stir_shaken.c@295
PS6, Line 295: ast_log(LOG_ERROR, "Failed to allocate space for STIR/SHAKEN datastore "
the datastore needs to be freed in this path too.
https://gerrit.asterisk.org/c/asterisk/+/14339/6/res/res_stir_shaken.c@1171
PS6, Line 1171: ast_channel_unlock(chan);
: if (current_index != target_index || !datastore) {
: ast_log(LOG_WARNING, "No STIR/SHAKEN results for index '%s'\n", args.first_param);
: return -1;
: }
: ss_datastore = datastore->data;
:
: if (!strcasecmp(args.second_param, "identity")) {
: ast_copy_string(buf, ss_datastore->identity, len);
: } else if (!strcasecmp(args.second_param, "attestation")) {
: ast_copy_string(buf, ss_datastore->attestation, len);
: } else if (!strcasecmp(args.second_param, "verify_result")) {
: ast_copy_string(buf, stir_shaken_verification_result_to_string(ss_datastore->verify_result), len);
: } else {
: ast_log(LOG_ERROR, "No such value '%s' for %s\n", args.second_param, function);
: return -1;
: }
Does this also need to be protected by the channel lock? seems like if the channel goes away, and the associated datastore this could be a problem.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14339
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ice6d52a3a7d6e4607c9c35b28a1f7c25f5284a82
Gerrit-Change-Number: 14339
Gerrit-PatchSet: 6
Gerrit-Owner: Benjamin Keith Ford <bford at digium.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-Comment-Date: Mon, 11 May 2020 22:35:57 +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/20200511/27507d8a/attachment.html>
More information about the asterisk-code-review
mailing list