diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-23 07:47:36 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-23 07:47:36 -0800 |
| commit | 92851a101abbf6770d6c247e4f3462b270efecd6 (patch) | |
| tree | a75ce86acd8f6114cb1f0df6b9e4c53a43c776d7 /src/sp/transport/udp | |
| parent | cb5febaea9d877209cc84fce7fd758f958613115 (diff) | |
| download | nng-92851a101abbf6770d6c247e4f3462b270efecd6.tar.gz nng-92851a101abbf6770d6c247e4f3462b270efecd6.tar.bz2 nng-92851a101abbf6770d6c247e4f3462b270efecd6.zip | |
udp: remove NNG_OPT_URL
Diffstat (limited to 'src/sp/transport/udp')
| -rw-r--r-- | src/sp/transport/udp/udp.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/sp/transport/udp/udp.c b/src/sp/transport/udp/udp.c index ad168642..298393a2 100644 --- a/src/sp/transport/udp/udp.c +++ b/src/sp/transport/udp/udp.c @@ -1646,38 +1646,6 @@ udp_ep_get_port(void *arg, void *buf, size_t *szp, nni_type t) } static int -udp_ep_get_url(void *arg, void *v, size_t *szp, nni_opt_type t) -{ - udp_ep *ep = arg; - char *s; - int rv; - int port = 0; - nng_sockaddr sa; - - nni_mtx_lock(&ep->mtx); - if (ep->udp != NULL) { - (void) nni_udp_sockname(ep->udp, &sa); - } else { - sa = ep->self_sa; - } - switch (sa.s_family) { - case NNG_AF_INET: - NNI_GET16((uint8_t *) &sa.s_in.sa_port, port); - break; - case NNG_AF_INET6: - NNI_GET16((uint8_t *) &sa.s_in6.sa_port, port); - break; - } - if ((rv = nni_url_asprintf_port(&s, ep->url, port)) == 0) { - rv = nni_copyout_str(s, v, szp, t); - nni_strfree(s); - } - nni_mtx_unlock(&ep->mtx); - - return (rv); -} - -static int udp_ep_get_locaddr(void *arg, void *v, size_t *szp, nni_opt_type t) { udp_ep *ep = arg; @@ -1874,10 +1842,6 @@ static const nni_option udp_ep_opts[] = { .o_set = udp_ep_set_copymax, }, { - .o_name = NNG_OPT_URL, - .o_get = udp_ep_get_url, - }, - { .o_name = NNG_OPT_LOCADDR, .o_get = udp_ep_get_locaddr, }, |
