From 7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 27 Apr 2025 23:35:25 -0700 Subject: Converted property functions to use nng_err. --- src/sp/protocol/pair0/pair.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/sp/protocol/pair0/pair.c') diff --git a/src/sp/protocol/pair0/pair.c b/src/sp/protocol/pair0/pair.c index 5dc7f67a..89bff7ce 100644 --- a/src/sp/protocol/pair0/pair.c +++ b/src/sp/protocol/pair0/pair.c @@ -430,14 +430,14 @@ pair0_sock_recv(void *arg, nni_aio *aio) nni_mtx_unlock(&s->mtx); } -static int +static nng_err pair0_set_send_buf_len(void *arg, const void *buf, size_t sz, nni_type t) { pair0_sock *s = arg; int val; - int rv; + nng_err rv; - if ((rv = nni_copyin_int(&val, buf, sz, 0, 8192, t)) != 0) { + if ((rv = nni_copyin_int(&val, buf, sz, 0, 8192, t)) != NNG_OK) { return (rv); } nni_mtx_lock(&s->mtx); @@ -452,7 +452,7 @@ pair0_set_send_buf_len(void *arg, const void *buf, size_t sz, nni_type t) return (rv); } -static int +static nng_err pair0_get_send_buf_len(void *arg, void *buf, size_t *szp, nni_opt_type t) { pair0_sock *s = arg; @@ -465,14 +465,14 @@ pair0_get_send_buf_len(void *arg, void *buf, size_t *szp, nni_opt_type t) return (nni_copyout_int(val, buf, szp, t)); } -static int +static nng_err pair0_set_recv_buf_len(void *arg, const void *buf, size_t sz, nni_type t) { pair0_sock *s = arg; int val; - int rv; + nng_err rv; - if ((rv = nni_copyin_int(&val, buf, sz, 0, 8192, t)) != 0) { + if ((rv = nni_copyin_int(&val, buf, sz, 0, 8192, t)) != NNG_OK) { return (rv); } nni_mtx_lock(&s->mtx); @@ -487,7 +487,7 @@ pair0_set_recv_buf_len(void *arg, const void *buf, size_t sz, nni_type t) return (rv); } -static int +static nng_err pair0_get_recv_buf_len(void *arg, void *buf, size_t *szp, nni_opt_type t) { pair0_sock *s = arg; @@ -500,7 +500,7 @@ pair0_get_recv_buf_len(void *arg, void *buf, size_t *szp, nni_opt_type t) return (nni_copyout_int(val, buf, szp, t)); } -static int +static nng_err pair0_sock_get_recv_fd(void *arg, int *fdp) { pair0_sock *s = arg; @@ -508,7 +508,7 @@ pair0_sock_get_recv_fd(void *arg, int *fdp) return (nni_pollable_getfd(&s->readable, fdp)); } -static int +static nng_err pair0_sock_get_send_fd(void *arg, int *fdp) { pair0_sock *s = arg; -- cgit v1.2.3-70-g09d2