diff options
Diffstat (limited to 'src/sp/transport/socket/sockfd.c')
| -rw-r--r-- | src/sp/transport/socket/sockfd.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/sp/transport/socket/sockfd.c b/src/sp/transport/socket/sockfd.c index c50360af..37debc85 100644 --- a/src/sp/transport/socket/sockfd.c +++ b/src/sp/transport/socket/sockfd.c @@ -682,11 +682,11 @@ error: nni_mtx_unlock(&ep->mtx); } -static int +static nng_err sfd_tran_listener_init(void *arg, nng_url *url, nni_listener *nlistener) { sfd_tran_ep *ep = arg; - int rv; + nng_err rv; nni_sock *sock = nni_listener_sock(nlistener); ep->nlistener = nlistener; @@ -715,7 +715,8 @@ sfd_tran_listener_init(void *arg, nng_url *url, nni_listener *nlistener) return (NNG_EADDRINVAL); } - if ((rv = nng_stream_listener_alloc_url(&ep->listener, url)) != 0) { + if ((rv = nng_stream_listener_alloc_url(&ep->listener, url)) != + NNG_OK) { sfd_tran_ep_fini(ep); return (rv); } @@ -724,7 +725,7 @@ sfd_tran_listener_init(void *arg, nng_url *url, nni_listener *nlistener) nni_listener_add_stat(nlistener, &ep->st_rcv_max); #endif - return (0); + return (NNG_OK); } static void @@ -830,12 +831,12 @@ static const nni_option sfd_tran_ep_opts[] = { }, }; -static int +static nng_err sfd_tran_listener_getopt( void *arg, const char *name, void *buf, size_t *szp, nni_type t) { sfd_tran_ep *ep = arg; - int rv; + nng_err rv; rv = nni_stream_listener_get(ep->listener, name, buf, szp, t); if (rv == NNG_ENOTSUP) { @@ -844,12 +845,12 @@ sfd_tran_listener_getopt( return (rv); } -static int +static nng_err sfd_tran_listener_setopt( void *arg, const char *name, const void *buf, size_t sz, nni_type t) { sfd_tran_ep *ep = arg; - int rv; + nng_err rv; rv = nni_stream_listener_set(ep->listener, name, buf, sz, t); if (rv == NNG_ENOTSUP) { |
