From 6d0027fae75e4810d66eb4c5817255ffa517e158 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 5 Jan 2019 16:30:02 -0800 Subject: fixes #839 TCP listener_start API should use constant sockaddr --- src/transport/tcp/tcp.c | 63 ------------------------------------------------- 1 file changed, 63 deletions(-) (limited to 'src/transport') diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c index 38b8cbaf..30695918 100644 --- a/src/transport/tcp/tcp.c +++ b/src/transport/tcp/tcp.c @@ -988,57 +988,6 @@ tcptran_ep_set_recvmaxsz(void *arg, const void *v, size_t sz, nni_opt_type t) return (rv); } -static int -tcptran_ep_get_nodelay(void *arg, void *v, size_t *szp, nni_opt_type t) -{ - tcptran_ep *ep = arg; - int rv; - nni_mtx_lock(&ep->mtx); - rv = nni_copyout_bool(ep->nodelay, v, szp, t); - nni_mtx_unlock(&ep->mtx); - return (rv); -} - -static int -tcptran_ep_set_nodelay(void *arg, const void *v, size_t sz, nni_opt_type t) -{ - tcptran_ep *ep = arg; - bool val; - int rv; - if (((rv = nni_copyin_bool(&val, v, sz, t)) == 0) && (ep != NULL)) { - nni_mtx_lock(&ep->mtx); - ep->nodelay = val; - nni_mtx_unlock(&ep->mtx); - } - return (rv); -} - -static int -tcptran_ep_get_keepalive(void *arg, void *v, size_t *szp, nni_opt_type t) -{ - tcptran_ep *ep = arg; - int rv; - - nni_mtx_lock(&ep->mtx); - rv = nni_copyout_bool(ep->keepalive, v, szp, t); - nni_mtx_unlock(&ep->mtx); - return (rv); -} - -static int -tcptran_ep_set_keepalive(void *arg, const void *v, size_t sz, nni_opt_type t) -{ - tcptran_ep *ep = arg; - bool val; - int rv; - if (((rv = nni_copyin_bool(&val, v, sz, t)) == 0) && (ep != NULL)) { - nni_mtx_lock(&ep->mtx); - ep->keepalive = val; - nni_mtx_unlock(&ep->mtx); - } - return (rv); -} - static int tcptran_ep_bind(void *arg) { @@ -1082,18 +1031,6 @@ tcptran_ep_accept(void *arg, nni_aio *aio) nni_mtx_unlock(&ep->mtx); } -static int -tcptran_ep_get_locaddr(void *arg, void *buf, size_t *szp, nni_opt_type t) -{ - tcptran_ep *ep = arg; - int rv; - - nni_mtx_lock(&ep->mtx); - rv = nni_copyout_sockaddr(&ep->bsa, buf, szp, t); - nni_mtx_unlock(&ep->mtx); - return (rv); -} - static nni_tran_pipe_ops tcptran_pipe_ops = { .p_init = tcptran_pipe_init, .p_fini = tcptran_pipe_fini, -- cgit v1.2.3-70-g09d2