<p>Corey Farrell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/7710">View Change</a></p><p>Patch set 6:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p style="white-space: pre-wrap; word-wrap: break-word;">Feel free to decide which comments to ignore or address. I don't mind if the sip_options_contact_statuses is deferred to another patch (this is already quite large), but I think it is worth addressing.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The AST_VECTOR_APPEND I mentioned should have error checking, that's the main reason for my -1.</p><p>(9 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c">File res/res_pjsip/pjsip_options.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@338">Patch Set #6, Line 338:</a> <code style="font-family:monospace,monospace"> return status_map[status];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Do we want:<br>ast_assert(status < ARRAY_LEN(status_map));</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@343">Patch Set #6, Line 343:</a> <code style="font-family:monospace,monospace"> return short_status_map[status];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Do we want:<br>ast_assert(status < ARRAY_LEN(short_status_map));</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@472">Patch Set #6, Line 472:</a> <code style="font-family:monospace,monospace"> if (!sip_options_contact_statuses) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is concerning. Why can't we fix the module initialization order to always create the container before it's possible to use it?</p><p style="white-space: pre-wrap; word-wrap: break-word;">What about during shutdown, is it possible for this block to recreate sip_options_contact_statuses after it's already been destroyed, or access the sip_options_contact_statuses while it's being free'd but before it's been NULL'ed?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1363">Patch Set #6, Line 1363:</a> <code style="font-family:monospace,monospace"> ast_log(LOG_ERROR, "Unable to schedule qualify for contacts of AOR '%s'\n",</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Is it not appropriate to return -1 here?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1530">Patch Set #6, Line 1530:</a> <code style="font-family:monospace,monospace"> AST_VECTOR_APPEND(&task_data->aor_options->compositors,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">AST_VECTOR_APPEND could fail, leaking a reference to task_data->endpoint_state_compositor.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1750">Patch Set #6, Line 1750:</a> <code style="font-family:monospace,monospace"> return 0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Error message or return -1?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@1960">Patch Set #6, Line 1960:</a> <code style="font-family:monospace,monospace"> return 0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Error message or return -1?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@2098">Patch Set #6, Line 2098:</a> <code style="font-family:monospace,monospace"> ast_log(LOG_ERROR, "Unable to schedule qualify for contacts of AOR '%s'\n",</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">return -1?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7710/6/res/res_pjsip/pjsip_options.c@2212">Patch Set #6, Line 2212:</a> <code style="font-family:monospace,monospace"> ao2_cleanup(task_data->aor_options);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Nit: task_data->aor_options is NULL.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/7710">change 7710</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7710"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I6a5ebbfca9001dfe933eaeac4d3babd8d2e6f082 </div>
<div style="display:none"> Gerrit-Change-Number: 7710 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 27 Apr 2018 15:55:47 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>