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/reqrep0/xreq.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/reqrep0/xreq.c')
| -rw-r--r-- | src/sp/protocol/reqrep0/xreq.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sp/protocol/reqrep0/xreq.c b/src/sp/protocol/reqrep0/xreq.c index 2bf3b95e..f80391dd 100644 --- a/src/sp/protocol/reqrep0/xreq.c +++ b/src/sp/protocol/reqrep0/xreq.c @@ -256,19 +256,20 @@ xreq0_sock_recv(void *arg, nni_aio *aio) nni_msgq_aio_get(s->urq, aio); } -static int +static nng_err xreq0_sock_set_max_ttl(void *arg, const void *buf, size_t sz, nni_opt_type t) { xreq0_sock *s = arg; int ttl; - int rv; - if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == 0) { + nng_err rv; + 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 xreq0_sock_get_max_ttl(void *arg, void *buf, size_t *szp, nni_opt_type t) { xreq0_sock *s = arg; |
