From 1880f91c49e19a7789ebb56e07d8481040eeeecd Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 4 Jun 2009 17:35:10 +0000 Subject: [PATCH] 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: https://svn.pjsip.org/repos/pjproject/trunk@2746 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pjsip/src/pjsip/sip_util.c b/pjsip/src/pjsip/sip_util.c index faf8bdb6c..959cc3b2b 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; }