#2070 closed enhancement (fixed)
Print IPv6 addresses with brackets in the log
Reported by: | ming | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.8 |
Component: | common | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description (last modified by ming)
Currently IPv6 addresses are printed as is, i.e. without brackets, in various places such as:
pjsip/src/pjsua-lib/pjsua_core.c:logging_on_tx_msg, and pjsip/src/pjsua-lib/pjsua_core.c:logging_on_rx_msg pjsip/src/pjsua-lib/pjsua_acc.c:acc_check_nat_addr with "IP address change detected for account" pjsip/src/pjsua-lib/pjsua_acc.c:update_keep_alive with "Keep-alive timer started for acc" pjsip/src/pjsip/sip_transport_tcp.c:on_connect_complete pjsip/src/pjsip/sip_transport_tls.c:on_connect_complete with "transport %.*s:%d is connected to"
For clarity, it is desirable for these addresses to be printed with the brackets, especially if there's a port number behind it.
In the SIP message itself, we have implemented this by adding beginquote and endquote, such as in
pjsua_acc.c: acc_check_nat_addr(), pjsua_acc_create_uac_contact(), pjsua_acc_create_uas_contact()
So we probably need to use pj_sockaddr_print() or create a helper new pjlib API instead of copy-pasting it all over the place.
Change History (3)
comment:1 Changed 7 years ago by ming
- Description modified (diff)
comment:2 Changed 6 years ago by riza
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 6 years ago by riza
In 5854:
Note: See
TracTickets for help on using
tickets.
In 5833: