<p><a href="https://gerrit.asterisk.org/c/asterisk/+/14406">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14406/1/res/res_pjsip_nat.c">File res/res_pjsip_nat.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14406/1/res/res_pjsip_nat.c@317">Patch Set #1, Line 317:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">while ((x_orig_host = pjsip_param_find(&uri->other_param, &x_name))) {<br>                               pj_list_erase(x_orig_host);<br>                   }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Any reason for the "while" here vs. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">To avoid any discussion and try to avoid to do the same work 4 times (as I am not working daily with gerrit and there is always some sort of work overhead when submitting a patch this way) I usually try to implement things as close as possible to how they got implemented by some asterisk dev somewhere else in the code.</p><p style="white-space: pre-wrap; word-wrap: break-word;">For this particular case her have a look at sanitize_data in pjsip_message_filter.c</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14406/1/res/res_pjsip_nat.c@321">Patch Set #1, Line 321:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">for (hdr = tdata->msg->hdr.next; hdr != &tdata->msg->hdr; hdr = hdr->next) {<br>                 if (hdr->type == PJSIP_H_TO) {<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Similar question but any reason to not use the "pjsip_msg_find_hdr", or PJSIP_MSG_TO_HDR macro, call […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same as above.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14406">change 14406</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/14406"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Id032b33098a1befea9b243ca994184baecccc59e </div>
<div style="display:none"> Gerrit-Change-Number: 14406 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: nappsoft <infos@nappsoft.ch> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-CC: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 19 May 2020 15:05:19 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>