diff options
author | Joshua Colp <jcolp@digium.com> | 2016-08-02 15:59:51 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-08-02 15:59:51 -0500 |
commit | 2a0f42c494e7c5f019510e41198969c6d4b9dea3 (patch) | |
tree | 5290512521a40b0397cd94d7d6381aeb458b4e3f | |
parent | 85f9642420da411c46d4d3f2f58f02e4ecb8ddcc (diff) | |
parent | b78d10a2dfcf605e8abcfdd070b75f992625ce7a (diff) |
Merge "res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports." into 13
-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); } |