diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-06-04 17:35:10 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-06-04 17:35:10 +0000 |
commit | 79a95cd0bbe6183c90e267686f9f9e5f23735ebe (patch) | |
tree | afc447ba687e6204d164d47ccd15871232ededb2 /pjsip/src | |
parent | 338ebfefef4eef8bff4a05bbe8544aa46f829c6a (diff) |
Ticket #861: IPv6: when an IPv6 URI has ";transport=udp" parameter, the resolver will use IPv4 transport and it will fail to resolve the URI
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2746 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsip/sip_util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_util.c b/pjsip/src/pjsip/sip_util.c index faf8bdb6..959cc3b2 100644 --- a/pjsip/src/pjsip/sip_util.c +++ b/pjsip/src/pjsip/sip_util.c @@ -806,6 +806,13 @@ static pj_status_t get_dest_info(const pjsip_uri *target_uri, return PJSIP_EINVALIDSCHEME; } + /* Handle IPv6 (http://trac.pjsip.org/repos/ticket/861) */ + if (dest_info->type != PJSIP_TRANSPORT_UNSPECIFIED && + pj_strchr(&dest_info->addr.host, ':')) + { + dest_info->type |= PJSIP_TRANSPORT_IPV6; + } + return PJ_SUCCESS; } |