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
This commit is contained in:
Benny Prijono 2009-06-04 17:35:10 +00:00
parent 84d2493f68
commit 1880f91c49
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}