aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/reqrep0/xrep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/protocol/reqrep0/xrep.c')
-rw-r--r--src/sp/protocol/reqrep0/xrep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sp/protocol/reqrep0/xrep.c b/src/sp/protocol/reqrep0/xrep.c
index 1a5f6e24..fe6c9fde 100644
--- a/src/sp/protocol/reqrep0/xrep.c
+++ b/src/sp/protocol/reqrep0/xrep.c
@@ -353,19 +353,20 @@ xrep0_pipe_putq_cb(void *arg)
nni_pipe_recv(p->pipe, &p->aio_recv);
}
-static int
+static nng_err
xrep0_sock_set_maxttl(void *arg, const void *buf, size_t sz, nni_opt_type t)
{
xrep0_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
xrep0_sock_get_maxttl(void *arg, void *buf, size_t *szp, nni_opt_type t)
{
xrep0_sock *s = arg;