[Asterisk-code-review] res_pjsip_nat.c: remove x-ast-orig-host from request URI and To header (asterisk[16])

nappsoft asteriskteam at digium.com
Tue May 19 10:05:19 CDT 2020


nappsoft has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14406 )

Change subject: res_pjsip_nat.c: remove x-ast-orig-host from request URI and To header
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/c/asterisk/+/14406/1/res/res_pjsip_nat.c 
File res/res_pjsip_nat.c:

https://gerrit.asterisk.org/c/asterisk/+/14406/1/res/res_pjsip_nat.c@317 
PS1, Line 317: while ((x_orig_host = pjsip_param_find(&uri->other_param, &x_name))) {
             : 				pj_list_erase(x_orig_host);
             : 			}
> Any reason for the "while" here vs. […]
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.

For this particular case her have a look at sanitize_data in pjsip_message_filter.c


https://gerrit.asterisk.org/c/asterisk/+/14406/1/res/res_pjsip_nat.c@321 
PS1, Line 321: for (hdr = tdata->msg->hdr.next; hdr != &tdata->msg->hdr; hdr = hdr->next) {
             : 			if (hdr->type == PJSIP_H_TO) {
> Similar question but any reason to not use the "pjsip_msg_find_hdr", or PJSIP_MSG_TO_HDR macro, call […]
Same as above.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14406
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id032b33098a1befea9b243ca994184baecccc59e
Gerrit-Change-Number: 14406
Gerrit-PatchSet: 1
Gerrit-Owner: nappsoft <infos at nappsoft.ch>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 19 May 2020 15:05:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200519/c191f1ec/attachment.html>


More information about the asterisk-code-review mailing list