[Asterisk-code-review] res stasis: Reduce RAII VAR usage. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Sun Jan 7 15:16:38 CST 2018
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7833 )
Change subject: res_stasis: Reduce RAII_VAR usage.
......................................................................
Patch Set 2: Code-Review-1
(4 comments)
https://gerrit.asterisk.org/#/c/7833/2/res/res_stasis.c
File res/res_stasis.c:
https://gerrit.asterisk.org/#/c/7833/2/res/res_stasis.c@1939
PS2, Line 1939: blob = ast_json_pack("{ss}", "eventname", event_name);
{s: s}
https://gerrit.asterisk.org/#/c/7833/2/res/res_stasis.c@1948
PS2, Line 1948: multi = ast_multi_object_blob_create(blob);
Creation can fail and thus multi would be NULL.
The stasis_message_create() would crash below before this patch too but the new ao2_refs would now crash.
https://gerrit.asterisk.org/#/c/7833/2/res/stasis/app.c
File res/stasis/app.c:
https://gerrit.asterisk.org/#/c/7833/2/res/stasis/app.c@1222
PS2, Line 1222: int append_res = -1;
This no longer needs to be initialized.
https://gerrit.asterisk.org/#/c/7833/2/res/stasis/control.c
File res/stasis/control.c:
https://gerrit.asterisk.org/#/c/7833/2/res/stasis/control.c@929
PS2, Line 929: ao2_lock(chan);
: bridge_channel = ast_channel_internal_bridge_channel(chan);
: ao2_unlock(chan);
Should be ast_channel_lock/ast_channel_unlock
--
To view, visit https://gerrit.asterisk.org/7833
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I4ce67120583a446babf9adeec678b71d37fcd9e5
Gerrit-Change-Number: 7833
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Sun, 07 Jan 2018 21:16:38 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180107/5bb1917a/attachment.html>
More information about the asterisk-code-review
mailing list