FSCORE-301

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12100 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-02-17 17:04:45 +00:00
parent 83ceb3e862
commit a3ae344f3d
1 changed files with 26 additions and 21 deletions

View File

@ -2452,31 +2452,36 @@ soa_init_sdp_connection_with_session(soa_session_t *ss,
sdp_connection_t const *mc; sdp_connection_t const *mc;
if (m->m_rejected) if (m->m_rejected)
continue; continue;
for (mc = m->m_connections; mc; mc = mc->c_next) { if (sdp && sdp->sdp_connection && sdp->sdp_connection->c_address) {
for (li = res; li; li = li->li_next) { for (mc = m->m_connections; mc; mc = mc->c_next) {
if (!su_casematch(li->li_canonname, sdp->sdp_connection->c_address)) for (li = res; li; li = li->li_next) {
continue; if (!li->li_canonname || !su_casematch(li->li_canonname, sdp->sdp_connection->c_address)) {
continue;
}
#if HAVE_SIN6 #if HAVE_SIN6
if (li->li_family == AF_INET6) { if (li->li_family == AF_INET6) {
if (ip6 > ip4) if (ip6 > ip4)
break; break;
else if (!li6) else if (!li6)
li6 = li; /* Best IP6 address */ li6 = li; /* Best IP6 address */
} }
#endif #endif
else if (li->li_family == AF_INET) { else if (li->li_family == AF_INET) {
if (ip4 > ip6) if (ip4 > ip6) {
break; break;
else if (!li4) } else if (!li4) {
li4 = li; /* Best IP4 address */ li4 = li; /* Best IP4 address */
}
}
}
}
}
if (li) {
break;
} }
}
}
if (li)
break;
} }
if (li == NULL && ip4) if (li == NULL && ip4)