diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-23 07:52:11 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-23 07:52:11 -0800 |
| commit | 142f29dad497366a84fffe3c113f7f2cdd957758 (patch) | |
| tree | bb90b58ca6e54a6cf7e445f715a5d5ef40e0eb92 /src | |
| parent | d430a1dcdf4a82e6ab14ee69ed180edd52b5c4d2 (diff) | |
| download | nng-142f29dad497366a84fffe3c113f7f2cdd957758.tar.gz nng-142f29dad497366a84fffe3c113f7f2cdd957758.tar.bz2 nng-142f29dad497366a84fffe3c113f7f2cdd957758.zip | |
tls: remove NNG_OPT_URL
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp/transport/tls/tls.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/sp/transport/tls/tls.c b/src/sp/transport/tls/tls.c index 929e3f8e..00d2554d 100644 --- a/src/sp/transport/tls/tls.c +++ b/src/sp/transport/tls/tls.c @@ -62,7 +62,6 @@ struct tlstran_ep { bool closed; bool fini; int refcnt; - nng_url *url; nni_list pipes; nni_reap_node reap; nng_stream_dialer *dialer; @@ -798,6 +797,7 @@ static int tlstran_ep_init(tlstran_ep **epp, nng_url *url, nni_sock *sock) { tlstran_ep *ep; + NNI_ARG_UNUSED(url); if ((ep = NNI_ALLOC_STRUCT(ep)) == NULL) { return (NNG_ENOMEM); @@ -808,7 +808,6 @@ tlstran_ep_init(tlstran_ep **epp, nng_url *url, nni_sock *sock) NNI_LIST_INIT(&ep->negopipes, tlstran_pipe, node); ep->proto = nni_sock_proto_id(sock); - ep->url = url; #ifdef NNG_ENABLE_STATS static const nni_stat_info rcv_max_info = { @@ -1052,25 +1051,6 @@ tlstran_ep_get_recvmaxsz(void *arg, void *v, size_t *szp, nni_type t) return (rv); } -static int -tlstran_ep_get_url(void *arg, void *v, size_t *szp, nni_type t) -{ - tlstran_ep *ep = arg; - char *s; - int rv; - int port = 0; - - if (ep->listener != NULL) { - (void) nng_stream_listener_get_int( - ep->listener, NNG_OPT_TCP_BOUND_PORT, &port); - } - if ((rv = nni_url_asprintf_port(&s, ep->url, port)) == 0) { - rv = nni_copyout_str(s, v, szp, t); - nni_strfree(s); - } - return (rv); -} - static const nni_option tlstran_pipe_opts[] = { // terminate list { @@ -1108,10 +1088,6 @@ static nni_option tlstran_ep_options[] = { .o_get = tlstran_ep_get_recvmaxsz, .o_set = tlstran_ep_set_recvmaxsz, }, - { - .o_name = NNG_OPT_URL, - .o_get = tlstran_ep_get_url, - }, // terminate list { .o_name = NULL, |
