[Asterisk-code-review] res pjsip notify: improve realtime performance on CLI comple... (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Fri Oct 26 17:04:11 CDT 2018
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/10550 )
Change subject: res_pjsip_notify: improve realtime performance on CLI completion on the endpoint
......................................................................
Patch Set 2: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/10550/2/res/res_pjsip_notify.c
File res/res_pjsip_notify.c:
https://gerrit.asterisk.org/#/c/10550/2/res/res_pjsip_notify.c@898
PS2, Line 898: if (endpoints != NULL && ao2_container_count(endpoints) > 0) {
Checking the endpoints container for a count is not necessary. ao2_iterator_next() will return NULL the first time if the container is really empty.
https://gerrit.asterisk.org/#/c/10550/2/res/res_pjsip_notify.c@908
PS2, Line 908: ao2_ref(endpoints, -1);
ao2_ref is not NULL tolerant. Use ao2_cleanup instead.
If you get rid of the ao2_container_count check you can pull the ao2_ref into the if clause because you will know that endpoints is not NULL.
--
To view, visit https://gerrit.asterisk.org/10550
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic20024912cc77bf4d3e476c4cd853293c52b254b
Gerrit-Change-Number: 10550
Gerrit-PatchSet: 2
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 26 Oct 2018 22:04:11 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181026/b2a6c016/attachment-0001.html>
More information about the asterisk-code-review
mailing list