[Asterisk-code-review] res/res hep pjsip: Fix reported local IP address when bound ... (asterisk[13])

Mark Michelson asteriskteam at digium.com
Thu May 12 16:20:05 CDT 2016


Mark Michelson has posted comments on this change.

Change subject: res/res_hep_pjsip: Fix reported local IP address when bound to 'any'
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/2815/2/res/res_hep_pjsip.c
File res/res_hep_pjsip.c:

PS2, Line 102: 		snprintf(local_buf, sizeof(local_buf), "%.*s:%hu",
             : 			(int)pj_strlen(&prm.ret_addr),
             : 			pj_strbuf(&prm.ret_addr),
             : 			prm.ret_port);
As lame as it is, I believe you'll need to be sure to manually add square brackets to IPv6 addresses here. Looking in PJLib's source code, the call to pjsip_tpmgr_find_local_addr2() calls get_net_interface(), which calls pj_sockaddr_print() on the resultant address structure. pj_sockaddr_print() is called with the flags parameter set to 0, which means that IPv6 addresses are printed bare with no square brackets.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I076f835d2aef489e1ee1d01595b211eb2ce62da3
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list