diff options
Diffstat (limited to 'src/sp/protocol/survey0/xsurvey.c')
| -rw-r--r-- | src/sp/protocol/survey0/xsurvey.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sp/protocol/survey0/xsurvey.c b/src/sp/protocol/survey0/xsurvey.c index 2891fba5..3c78c392 100644 --- a/src/sp/protocol/survey0/xsurvey.c +++ b/src/sp/protocol/survey0/xsurvey.c @@ -272,19 +272,20 @@ xsurv0_recv_cb(void *arg) nni_msgq_aio_put(p->psock->urq, &p->aio_putq); } -static int +static nng_err xsurv0_sock_set_max_ttl(void *arg, const void *buf, size_t sz, nni_opt_type t) { xsurv0_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 xsurv0_sock_get_max_ttl(void *arg, void *buf, size_t *szp, nni_opt_type t) { xsurv0_sock *s = arg; |
