Commit 8cca31cd authored by Pekka Pessi's avatar Pekka Pessi

tport: tport_name_is_resolved() now uses host_is_ip_address()

darcs-hash:20071120170919-65a35-7ed08de61d6d7829d71619c1aead27efe7616933.gz
parent c6c91406
......@@ -4613,27 +4613,10 @@ int tport_name_by_url(su_home_t *home,
/** Check if transport named is already resolved */
int tport_name_is_resolved(tp_name_t const *tpn)
{
size_t n;
if (!tpn->tpn_host)
return 0;
if (tpn->tpn_host[0] == '[')
return 1;
n = strspn(tpn->tpn_host, ".0123456789");
if (tpn->tpn_host[n] == '\0')
return 1;
if (strchr(tpn->tpn_host, ':')) {
n = strspn(tpn->tpn_host, ":0123456789abcdefABCDEF");
if (tpn->tpn_host[n] == '\0')
return 1;
}
return 0;
return host_is_ip_address(tpn->tpn_host);
}
/** Duplicate name.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment