[Asterisk-code-review] res pjsip notify: improve realtime performance on CLI comple... (asterisk[13])

Corey Farrell asteriskteam at digium.com
Fri Oct 26 17:17:05 CDT 2018


Corey Farrell 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:

(3 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) {
> I wanted to avoid ao2_iterator_init/destroy. […]
ao2_iterator_init/destroy are very light weight and I think the nominal case when someone requests this completion is that it won't be empty.


https://gerrit.asterisk.org/#/c/10550/2/res/res_pjsip_notify.c@900
PS2, Line 900: 		struct ao2_iterator i = ao2_iterator_init(endpoints, 0);
A blank line after the variable declarations would be nice for readability.


https://gerrit.asterisk.org/#/c/10550/2/res/res_pjsip_notify.c@904
PS2, Line 904: 			ao2_cleanup(endpoint);
Technically this can be ao2_ref(endpoint, -1) since endpoint cannot be NULL here.



-- 
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: 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:17:05 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181026/baa8e05d/attachment.html>


More information about the asterisk-code-review mailing list