From 1d69c8f0393337d4f222cc1af1af813d77922c84 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 27 Oct 2025 07:11:12 -0700 Subject: Remove the ability to get sockaddrs from endpoints. There is no valid use for this, once we added the ability to query the bound port. --- src/platform/posix/posix_tcpdial.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/platform/posix') diff --git a/src/platform/posix/posix_tcpdial.c b/src/platform/posix/posix_tcpdial.c index 12fa990f..c526185f 100644 --- a/src/platform/posix/posix_tcpdial.c +++ b/src/platform/posix/posix_tcpdial.c @@ -340,20 +340,6 @@ tcp_dialer_get_keepalive(void *arg, void *buf, size_t *szp, nni_type t) return (nni_copyout_bool(b, buf, szp, t)); } -static nng_err -tcp_dialer_get_locaddr(void *arg, void *buf, size_t *szp, nni_type t) -{ - nni_tcp_dialer *d = arg; - nng_sockaddr sa; - - nni_mtx_lock(&d->mtx); - if (nni_posix_sockaddr2nn(&sa, &d->src, d->srclen) != 0) { - sa.s_family = NNG_AF_UNSPEC; - } - nni_mtx_unlock(&d->mtx); - return (nni_copyout_sockaddr(&sa, buf, szp, t)); -} - static nng_err tcp_dialer_set_locaddr(void *arg, const void *buf, size_t sz, nni_type t) { @@ -412,7 +398,6 @@ tcp_dialer_set_locaddr(void *arg, const void *buf, size_t sz, nni_type t) static const nni_option tcp_dialer_options[] = { { .o_name = NNG_OPT_LOCADDR, - .o_get = tcp_dialer_get_locaddr, .o_set = tcp_dialer_set_locaddr, }, { -- cgit v1.2.3-70-g09d2