From 452ecf5ae83adc9ae77518746f4f81171c42248c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 31 Oct 2020 18:47:07 -0700 Subject: fixes #1311 reduce wasted use for nni_aio fixes #1317 IPv6 listener get port is incorrect fixes #1319 Want symbolic service names This is phase 1 of reducing the memory foot-print of aios, and also of pipes. This removes the largest consumer the socket address information, from the aio, which was only used by a few consumers. --- src/transport/tls/tls.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/transport/tls') diff --git a/src/transport/tls/tls.c b/src/transport/tls/tls.c index c291ecf7..76e182a4 100644 --- a/src/transport/tls/tls.c +++ b/src/transport/tls/tls.c @@ -701,11 +701,8 @@ tlstran_url_parse_source(nni_url *url, nng_sockaddr *sa, const nni_url *surl) return (rv); } - nni_tcp_resolv(src, 0, af, 1, aio); + nni_resolv_ip(src, "0", af, 1, sa, aio); nni_aio_wait(aio); - if ((rv = nni_aio_result(aio)) == 0) { - nni_aio_get_sockaddr(aio, sa); - } nni_aio_free(aio); nni_free(src, len + 1); return (rv); @@ -939,8 +936,7 @@ tlstran_ep_init_listener(void **lp, nni_url *url, nni_listener *nlistener) tlstran_ep_fini(ep); return (rv); } - nni_aio_set_input(aio, 0, &ep->sa); - nni_tcp_resolv(host, url->u_port, af, 1, aio); + nni_resolv_ip(host, url->u_port, af, true, &ep->sa, aio); nni_aio_wait(aio); rv = nni_aio_result(aio); nni_aio_free(aio); -- cgit v1.2.3-70-g09d2