diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-04-27 23:35:25 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-04-27 23:35:25 -0700 |
| commit | 7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4 (patch) | |
| tree | 5a3036d609404ee5218b6189a89799e70f4623df /src/sp/protocol/pair1/pair1_poly.c | |
| parent | 70ae513e4dda50864f7d45b6676549ed5246144d (diff) | |
| download | nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.gz nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.bz2 nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.zip | |
Converted property functions to use nng_err.
Diffstat (limited to 'src/sp/protocol/pair1/pair1_poly.c')
| -rw-r--r-- | src/sp/protocol/pair1/pair1_poly.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sp/protocol/pair1/pair1_poly.c b/src/sp/protocol/pair1/pair1_poly.c index 0e8a93f3..af3ede3b 100644 --- a/src/sp/protocol/pair1/pair1_poly.c +++ b/src/sp/protocol/pair1/pair1_poly.c @@ -443,28 +443,29 @@ pair1poly_sock_close(void *arg) nni_aio_close(&s->aio_get); } -static int +static nng_err pair1poly_set_max_ttl(void *arg, const void *buf, size_t sz, nni_opt_type t) { pair1poly_sock *s = arg; - int rv; + nng_err rv; int ttl; - if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == 0) { + if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == + NNG_OK) { nni_atomic_set(&s->ttl, ttl); } return (rv); } -static int +static nng_err pair1poly_get_max_ttl(void *arg, void *buf, size_t *szp, nni_opt_type t) { pair1poly_sock *s = arg; return (nni_copyout_int(nni_atomic_get(&s->ttl), buf, szp, t)); } -static int +static nng_err pair1poly_get_poly(void *arg, void *buf, size_t *szp, nni_opt_type t) { NNI_ARG_UNUSED(arg); |
