[Asterisk-code-review] pjsip: Rewrite OPTIONS support with new eyes. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Fri Apr 27 17:14:01 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7710 )

Change subject: pjsip: Rewrite OPTIONS support with new eyes.
......................................................................


Patch Set 6:

(10 comments)

https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c
File res/res_pjsip/pjsip_options.c:

https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@338
PS6, Line 338: 	return status_map[status];
> Do we want:
Done


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@343
PS6, Line 343: 	return short_status_map[status];
> Do we want:
Done


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@472
PS6, Line 472: 	if (!sip_options_contact_statuses) {
> Additional note: I'm also assuming this can be hit by a race condition.  If
Done


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@472
PS6, Line 472: 	if (!sip_options_contact_statuses) {
> This is concerning.  Why can't we fix the module initialization order to al
Done


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1363
PS6, Line 1363: 				ast_log(LOG_ERROR, "Unable to schedule qualify for contacts of AOR '%s'\n",
> Is it not appropriate to return -1 here?
It doesn't really matter.  We have done everything but get the timer started and nobody cares about the return value because they cannot do anything about it anyway.  I have changed the function to return void.


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1530
PS6, Line 1530: 	AST_VECTOR_APPEND(&task_data->aor_options->compositors,
> AST_VECTOR_APPEND could fail, leaking a reference to task_data->endpoint_st
Done


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1750
PS6, Line 1750: 			return 0;
> Error message or return -1?
The return value doesn't matter and we have already had a malloc failure error logged.


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1960
PS6, Line 1960: 			return 0;
> Error message or return -1?
The return value doesn't matter and we have already had a malloc failure error logged.


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@2098
PS6, Line 2098: 				ast_log(LOG_ERROR, "Unable to schedule qualify for contacts of AOR '%s'\n",
> return -1?
The return value doesn't matter.


https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@2212
PS6, Line 2212: 		ao2_cleanup(task_data->aor_options);
> Nit: task_data->aor_options is NULL.
Done



-- 
To view, visit https://gerrit.asterisk.org/7710
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a5ebbfca9001dfe933eaeac4d3babd8d2e6f082
Gerrit-Change-Number: 7710
Gerrit-PatchSet: 6
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 27 Apr 2018 22:14:01 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180427/e751ed7a/attachment-0001.html>


More information about the asterisk-code-review mailing list