assert(tport);
*tpn = *tport_name(tport);
- tpn->tpn_host = d->target->m_url->url_host;
- tpn->tpn_port = d->target->m_url->url_port;
+ if (tport_is_udp(tport)) {
+ tpn->tpn_host = d->target->m_url->url_host;
+ tpn->tpn_port = url_port(d->target->m_url);
+ if (!tpn->tpn_port || !tpn->tpn_port[0])
+ tpn->tpn_port = url_port_default(d->target->m_url->url_type);
+ }
magic = tport_magic(tport);
assert(magic != NULL);
_s2case = number;
}
-
/* ---------------------------------------------------------------------- */
/* tport interface */
static void