diff options
author | Alexander Traud <pabstraud@compuserve.com> | 2016-08-02 10:08:34 +0200 |
---|---|---|
committer | Alexander Traud <pabstraud@compuserve.com> | 2016-08-02 03:15:54 -0500 |
commit | b78d10a2dfcf605e8abcfdd070b75f992625ce7a (patch) | |
tree | 21e3b75067454ec6b20879f8bf83fca7f8b46c36 /res | |
parent | 104b17eea90d00c8412a32611fdd8d25030589f2 (diff) |
res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports.
ASTERISK-26256 #close
Change-Id: I3fd68df561f81fdb8c6c497d465b50c12422f058
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 3870e9f8d..46f05f991 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -2138,13 +2138,13 @@ static struct ast_threadpool *sip_threadpool; static pj_sockaddr host_ip_ipv4; /*! Local host address for IPv4 (string form) */ -static char host_ip_ipv4_string[PJ_INET6_ADDRSTRLEN + 2]; +static char host_ip_ipv4_string[PJ_INET6_ADDRSTRLEN]; /*! Local host address for IPv6 */ static pj_sockaddr host_ip_ipv6; /*! Local host address for IPv6 (string form) */ -static char host_ip_ipv6_string[PJ_INET6_ADDRSTRLEN + 2]; +static char host_ip_ipv6_string[PJ_INET6_ADDRSTRLEN]; static int register_service_noref(void *data) { @@ -4229,6 +4229,7 @@ static int unload_pjsip(void *data) static int load_pjsip(void) { + const unsigned int flags = 0; /* no port, no brackets */ pj_status_t status; /* The third parameter is just copied from @@ -4253,12 +4254,12 @@ static int load_pjsip(void) } if (!pj_gethostip(pj_AF_INET(), &host_ip_ipv4)) { - pj_sockaddr_print(&host_ip_ipv4, host_ip_ipv4_string, sizeof(host_ip_ipv4_string), 2); + pj_sockaddr_print(&host_ip_ipv4, host_ip_ipv4_string, sizeof(host_ip_ipv4_string), flags); ast_verb(3, "Local IPv4 address determined to be: %s\n", host_ip_ipv4_string); } if (!pj_gethostip(pj_AF_INET6(), &host_ip_ipv6)) { - pj_sockaddr_print(&host_ip_ipv6, host_ip_ipv6_string, sizeof(host_ip_ipv6_string), 2); + pj_sockaddr_print(&host_ip_ipv6, host_ip_ipv6_string, sizeof(host_ip_ipv6_string), flags); ast_verb(3, "Local IPv6 address determined to be: %s\n", host_ip_ipv6_string); } |